@@ -60,7 +60,7 @@ def setUp(self):
6060 )
6161
6262 self .eligible_item = LoadItemFactory .create (
63- parent_guid = str (uuid4 ()),
63+ parent_event_id = str (uuid4 ()),
6464 connector = self .connector ,
6565 item_eligible = True ,
6666 is_past_event = False ,
@@ -107,7 +107,7 @@ def test_sent_email_for_eligible_item(self, mock_send_notification):
107107 self .assertIsNotNone (log .email_sent_at )
108108
109109 self .assertEqual (thread .user , self .user1 )
110- self .assertEqual (thread .parent_guid , self .eligible_item .parent_guid )
110+ self .assertEqual (thread .parent_event_id , self .eligible_item .parent_event_id )
111111 self .assertEqual (thread .root_email_message_id , log .message_id )
112112 self .assertEqual (log .thread , thread )
113113
@@ -121,7 +121,7 @@ def test_sent_email_to_multiple_users(self, mock_send_notification):
121121 logs = AlertEmailLog .objects .filter (item = self .eligible_item , status = AlertEmailLog .Status .SENT )
122122 self .assertEqual (logs .count (), 2 )
123123
124- threads = AlertEmailThread .objects .filter (parent_guid = self .eligible_item .parent_guid )
124+ threads = AlertEmailThread .objects .filter (parent_event_id = self .eligible_item .parent_event_id )
125125 self .assertEqual (threads .count (), 2 )
126126
127127 self .assertEqual (mock_send_notification .call_count , 2 )
@@ -217,7 +217,7 @@ def test_reply_email_for_existing_thread(self, mock_send_notification):
217217 )
218218
219219 initial_item = LoadItemFactory .create (
220- parent_guid = str (uuid4 ()),
220+ parent_event_id = str (uuid4 ()),
221221 connector = self .connector ,
222222 item_eligible = True ,
223223 is_past_event = False ,
@@ -231,7 +231,7 @@ def test_reply_email_for_existing_thread(self, mock_send_notification):
231231
232232 thread = AlertEmailThreadFactory .create (
233233 user = user ,
234- parent_guid = initial_item .parent_guid ,
234+ parent_event_id = initial_item .parent_event_id ,
235235 root_email_message_id = str (uuid4 ()),
236236 root_message_sent_at = timezone .now (),
237237 )
@@ -247,7 +247,7 @@ def test_reply_email_for_existing_thread(self, mock_send_notification):
247247 )
248248
249249 update_item = LoadItemFactory .create (
250- parent_guid = initial_item .parent_guid ,
250+ parent_event_id = initial_item .parent_event_id ,
251251 connector = self .connector ,
252252 item_eligible = True ,
253253 is_past_event = False ,
@@ -267,17 +267,17 @@ def test_reply_email_for_existing_thread(self, mock_send_notification):
267267
268268 mock_send_notification .assert_called_once ()
269269
270- threads = AlertEmailThread .objects .filter (parent_guid = initial_item .parent_guid )
270+ threads = AlertEmailThread .objects .filter (parent_event_id = initial_item .parent_event_id )
271271 self .assertEqual (threads .count (), 1 )
272272
273273 @mock .patch ("alert_system.email_processing.send_notification" )
274274 def test_reply_email_to_multiple_users (self , mock_send_notification ):
275275
276- parent_guid = str (uuid4 ())
276+ parent_event_id = str (uuid4 ())
277277
278278 # Create initial item
279279 initial_item = LoadItemFactory .create (
280- parent_guid = parent_guid ,
280+ parent_event_id = parent_event_id ,
281281 connector = self .connector ,
282282 item_eligible = True ,
283283 is_past_event = False ,
@@ -292,14 +292,14 @@ def test_reply_email_to_multiple_users(self, mock_send_notification):
292292 # Create threads for both users
293293 thread1 = AlertEmailThreadFactory .create (
294294 user = self .user1 ,
295- parent_guid = parent_guid ,
295+ parent_event_id = parent_event_id ,
296296 root_email_message_id = "message-id-1" ,
297297 root_message_sent_at = timezone .now (),
298298 )
299299
300300 thread2 = AlertEmailThreadFactory .create (
301301 user = self .user2 ,
302- parent_guid = parent_guid ,
302+ parent_event_id = parent_event_id ,
303303 root_email_message_id = "message-id-2" ,
304304 root_message_sent_at = timezone .now (),
305305 )
@@ -325,7 +325,7 @@ def test_reply_email_to_multiple_users(self, mock_send_notification):
325325 )
326326
327327 related_item = LoadItemFactory .create (
328- parent_guid = parent_guid ,
328+ parent_event_id = parent_event_id ,
329329 connector = self .connector ,
330330 item_eligible = True ,
331331 is_past_event = False ,
@@ -350,7 +350,7 @@ def test_reply_email_to_multiple_users(self, mock_send_notification):
350350 @mock .patch ("alert_system.email_processing.send_notification" )
351351 def test_duplicate_reply (self , mock_send_notification ):
352352
353- parent_guid = str (uuid4 ())
353+ parent_event_id = str (uuid4 ())
354354
355355 user = UserFactory .create ()
356356 country = CountryFactory .create (
@@ -366,7 +366,7 @@ def test_duplicate_reply(self, mock_send_notification):
366366 )
367367
368368 LoadItemFactory .create (
369- parent_guid = parent_guid ,
369+ parent_event_id = parent_event_id ,
370370 connector = self .connector ,
371371 item_eligible = True ,
372372 is_past_event = False ,
@@ -380,13 +380,13 @@ def test_duplicate_reply(self, mock_send_notification):
380380
381381 thread = AlertEmailThreadFactory .create (
382382 user = user ,
383- parent_guid = parent_guid ,
383+ parent_event_id = parent_event_id ,
384384 root_email_message_id = "root-123" ,
385385 root_message_sent_at = timezone .now (),
386386 )
387387
388388 update_item = LoadItemFactory .create (
389- parent_guid = parent_guid ,
389+ parent_event_id = parent_event_id ,
390390 connector = self .connector ,
391391 item_eligible = True ,
392392 is_past_event = False ,
0 commit comments