@@ -208,6 +208,7 @@ def test_create_impression_event_when_attribute_is_not_in_datafile(self):
208208 '111129' ,
209209 'test_user' ,
210210 {'do_you_know_me' : 'test_value' },
211+ 'US'
211212 )
212213 self ._validate_event_object (
213214 event_obj ,
@@ -280,6 +281,7 @@ def side_effect(*args, **kwargs):
280281 '111129' ,
281282 'test_user' ,
282283 attributes ,
284+ 'US' ,
283285 )
284286
285287 self ._validate_event_object (
@@ -346,6 +348,7 @@ def test_create_impression_event__with_user_agent_when_bot_filtering_is_enabled(
346348 '111129' ,
347349 'test_user' ,
348350 {'$opt_user_agent' : 'Edge' },
351+ 'US'
349352 )
350353
351354 self ._validate_event_object (
@@ -411,6 +414,7 @@ def test_create_impression_event__with_empty_attributes_when_bot_filtering_is_en
411414 '111129' ,
412415 'test_user' ,
413416 None ,
417+ 'US'
414418 )
415419
416420 self ._validate_event_object (
@@ -482,6 +486,7 @@ def test_create_impression_event__with_user_agent_when_bot_filtering_is_disabled
482486 '111129' ,
483487 'test_user' ,
484488 {'$opt_user_agent' : 'Chrome' },
489+ 'US'
485490 )
486491
487492 self ._validate_event_object (
@@ -529,7 +534,7 @@ def test_create_conversion_event(self):
529534 'uuid.uuid4' , return_value = 'a68cf1ad-0393-4e18-af87-efe8f01a7c9c'
530535 ):
531536 event_obj = self .event_builder .create_conversion_event (
532- self .project_config , 'test_event' , 'test_user' , None , None
537+ self .project_config , 'test_event' , 'test_user' , None , None , 'US'
533538 )
534539 self ._validate_event_object (
535540 event_obj ,
@@ -578,7 +583,7 @@ def test_create_conversion_event__with_attributes(self):
578583 'uuid.uuid4' , return_value = 'a68cf1ad-0393-4e18-af87-efe8f01a7c9c'
579584 ):
580585 event_obj = self .event_builder .create_conversion_event (
581- self .project_config , 'test_event' , 'test_user' , {'test_attribute' : 'test_value' }, None ,
586+ self .project_config , 'test_event' , 'test_user' , {'test_attribute' : 'test_value' }, None , 'US'
582587 )
583588 self ._validate_event_object (
584589 event_obj ,
@@ -636,7 +641,7 @@ def test_create_conversion_event__with_user_agent_when_bot_filtering_is_enabled(
636641 'optimizely.project_config.ProjectConfig.get_bot_filtering_value' , return_value = True ,
637642 ):
638643 event_obj = self .event_builder .create_conversion_event (
639- self .project_config , 'test_event' , 'test_user' , {'$opt_user_agent' : 'Edge' }, None ,
644+ self .project_config , 'test_event' , 'test_user' , {'$opt_user_agent' : 'Edge' }, None , 'US'
640645 )
641646
642647 self ._validate_event_object (
@@ -700,7 +705,7 @@ def test_create_conversion_event__with_user_agent_when_bot_filtering_is_disabled
700705 'optimizely.project_config.ProjectConfig.get_bot_filtering_value' , return_value = False ,
701706 ):
702707 event_obj = self .event_builder .create_conversion_event (
703- self .project_config , 'test_event' , 'test_user' , {'$opt_user_agent' : 'Chrome' }, None ,
708+ self .project_config , 'test_event' , 'test_user' , {'$opt_user_agent' : 'Chrome' }, None , 'US'
704709 )
705710
706711 self ._validate_event_object (
@@ -758,6 +763,7 @@ def test_create_conversion_event__with_event_tags(self):
758763 'test_user' ,
759764 {'test_attribute' : 'test_value' },
760765 {'revenue' : 4200 , 'value' : 1.234 , 'non-revenue' : 'abc' },
766+ 'US'
761767 )
762768 self ._validate_event_object (
763769 event_obj ,
@@ -812,6 +818,7 @@ def test_create_conversion_event__with_invalid_event_tags(self):
812818 'test_user' ,
813819 {'test_attribute' : 'test_value' },
814820 {'revenue' : '4200' , 'value' : True , 'non-revenue' : 'abc' },
821+ 'US'
815822 )
816823 self ._validate_event_object (
817824 event_obj ,
@@ -868,6 +875,7 @@ def test_create_conversion_event__when_event_is_used_in_multiple_experiments(sel
868875 'test_user' ,
869876 {'test_attribute' : 'test_value' },
870877 {'revenue' : 4200 , 'value' : 1.234 , 'non-revenue' : 'abc' },
878+ 'US'
871879 )
872880 self ._validate_event_object (
873881 event_obj ,
0 commit comments