Skip to content

Commit dafb205

Browse files
committed
Fix test cases
1 parent 8e92fda commit dafb205

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

tests/test_event_factory.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def test_create_impression_event_with_eu(self):
180180
False,
181181
'test_user',
182182
None,
183+
None,
183184
)
184185

185186
log_event = EventFactory.create_log_event(event_obj, self.logger)
@@ -1157,7 +1158,11 @@ def test_create_impression_event_with_cmab_uuid(self):
11571158
log_event = EventFactory.create_log_event(event_obj, self.logger)
11581159

11591160
self._validate_event_object(
1160-
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
1161+
log_event,
1162+
EventFactory.EVENT_ENDPOINTS.get('US'),
1163+
expected_params,
1164+
EventFactory.HTTP_VERB,
1165+
EventFactory.HTTP_HEADERS,
11611166
)
11621167

11631168
def test_create_impression_event_without_cmab_uuid(self):
@@ -1226,5 +1231,9 @@ def test_create_impression_event_without_cmab_uuid(self):
12261231
self.assertNotIn('cmab_uuid', metadata)
12271232

12281233
self._validate_event_object(
1229-
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
1234+
log_event,
1235+
EventFactory.EVENT_ENDPOINTS.get('US'),
1236+
expected_params,
1237+
EventFactory.HTTP_VERB,
1238+
EventFactory.HTTP_HEADERS,
12301239
)

tests/test_user_event_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_impression_event_with_region_eu(self):
5151
project_config.region = 'EU'
5252

5353
impression_event = UserEventFactory.create_impression_event(
54-
project_config, experiment, '111128', '', 'rule_key', 'rule_type', True, user_id, None
54+
project_config, experiment, '111128', '', 'rule_key', 'rule_type', True, user_id, None, None
5555
)
5656

5757
self.assertEqual(self.project_config.region, impression_event.event_context.region)

0 commit comments

Comments
 (0)