Skip to content

[FSSDK-11458] Python - Add SDK Multi-Region Support for Data Hosting #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test cases
  • Loading branch information
esrakartalOpt committed Jul 2, 2025
commit f68d67800feffd61f1277003b1f5b43ec8cd05bf
28 changes: 14 additions & 14 deletions tests/test_event_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_create_impression_event(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_impression_event__with_attributes(self):
Expand Down Expand Up @@ -182,7 +182,7 @@ def test_create_impression_event__with_attributes(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_impression_event_when_attribute_is_not_in_datafile(self):
Expand Down Expand Up @@ -244,7 +244,7 @@ def test_create_impression_event_when_attribute_is_not_in_datafile(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_impression_event_calls_is_attribute_valid(self):
Expand Down Expand Up @@ -323,7 +323,7 @@ def side_effect(*args, **kwargs):

self._validate_event_object(
log_event,
EventFactory.EVENT_ENDPOINT,
EventFactory.EVENT_ENDPOINTS.get('US'),
expected_params,
EventFactory.HTTP_VERB,
EventFactory.HTTP_HEADERS,
Expand Down Expand Up @@ -399,7 +399,7 @@ def test_create_impression_event__with_user_agent_when_bot_filtering_is_enabled(
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_impression_event__with_empty_attributes_when_bot_filtering_is_enabled(self,):
Expand Down Expand Up @@ -471,7 +471,7 @@ def test_create_impression_event__with_empty_attributes_when_bot_filtering_is_en
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_impression_event__with_user_agent_when_bot_filtering_is_disabled(self,):
Expand Down Expand Up @@ -549,7 +549,7 @@ def test_create_impression_event__with_user_agent_when_bot_filtering_is_disabled
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event(self):
Expand Down Expand Up @@ -595,7 +595,7 @@ def test_create_conversion_event(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event__with_attributes(self):
Expand Down Expand Up @@ -643,7 +643,7 @@ def test_create_conversion_event__with_attributes(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event__with_user_agent_when_bot_filtering_is_enabled(self,):
Expand Down Expand Up @@ -700,7 +700,7 @@ def test_create_conversion_event__with_user_agent_when_bot_filtering_is_enabled(
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event__with_user_agent_when_bot_filtering_is_disabled(self,):
Expand Down Expand Up @@ -762,7 +762,7 @@ def test_create_conversion_event__with_user_agent_when_bot_filtering_is_disabled
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event__with_event_tags(self):
Expand Down Expand Up @@ -817,7 +817,7 @@ def test_create_conversion_event__with_event_tags(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event__with_invalid_event_tags(self):
Expand Down Expand Up @@ -870,7 +870,7 @@ def test_create_conversion_event__with_invalid_event_tags(self):
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)

def test_create_conversion_event__when_event_is_used_in_multiple_experiments(self):
Expand Down Expand Up @@ -925,5 +925,5 @@ def test_create_conversion_event__when_event_is_used_in_multiple_experiments(sel
log_event = EventFactory.create_log_event(event_obj, self.logger)

self._validate_event_object(
log_event, EventFactory.EVENT_ENDPOINT, expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
log_event, EventFactory.EVENT_ENDPOINTS.get('US'), expected_params, EventFactory.HTTP_VERB, EventFactory.HTTP_HEADERS,
)
Loading