@@ -314,7 +314,7 @@ def test_basic_capture_with_feature_flags_returns_active_only(self, patch_decide
314314 self .assertEqual (patch_decide .call_count , 1 )
315315 patch_decide .assert_called_with (
316316 "random_key" ,
317- None ,
317+ "https://us-api.i.posthog.com" ,
318318 timeout = 10 ,
319319 distinct_id = "distinct_id" ,
320320 groups = {},
@@ -330,7 +330,11 @@ def test_basic_capture_with_feature_flags_and_disable_geoip_returns_correctly(se
330330 }
331331
332332 client = Client (
333- FAKE_TEST_API_KEY , on_error = self .set_fail , personal_api_key = FAKE_TEST_API_KEY , disable_geoip = True
333+ FAKE_TEST_API_KEY ,
334+ host = "https://app.posthog.com" ,
335+ on_error = self .set_fail ,
336+ personal_api_key = FAKE_TEST_API_KEY ,
337+ disable_geoip = True ,
334338 )
335339 success , msg = client .capture ("distinct_id" , "python test event" , send_feature_flags = True , disable_geoip = False )
336340 client .flush ()
@@ -351,7 +355,7 @@ def test_basic_capture_with_feature_flags_and_disable_geoip_returns_correctly(se
351355 self .assertEqual (patch_decide .call_count , 1 )
352356 patch_decide .assert_called_with (
353357 "random_key" ,
354- None ,
358+ "https://us-api.i.posthog.com" ,
355359 timeout = 10 ,
356360 distinct_id = "distinct_id" ,
357361 groups = {},
@@ -779,7 +783,7 @@ def test_disable_geoip_default_on_decide(self, patch_decide):
779783 client .get_feature_flag ("random_key" , "some_id" , disable_geoip = True )
780784 patch_decide .assert_called_with (
781785 "random_key" ,
782- None ,
786+ "https://us-api.i.posthog.com" ,
783787 timeout = 10 ,
784788 distinct_id = "some_id" ,
785789 groups = {},
@@ -791,7 +795,7 @@ def test_disable_geoip_default_on_decide(self, patch_decide):
791795 client .feature_enabled ("random_key" , "feature_enabled_distinct_id" , disable_geoip = True )
792796 patch_decide .assert_called_with (
793797 "random_key" ,
794- None ,
798+ "https://us-api.i.posthog.com" ,
795799 timeout = 10 ,
796800 distinct_id = "feature_enabled_distinct_id" ,
797801 groups = {},
@@ -803,7 +807,7 @@ def test_disable_geoip_default_on_decide(self, patch_decide):
803807 client .get_all_flags_and_payloads ("all_flags_payloads_id" )
804808 patch_decide .assert_called_with (
805809 "random_key" ,
806- None ,
810+ "https://us-api.i.posthog.com" ,
807811 timeout = 10 ,
808812 distinct_id = "all_flags_payloads_id" ,
809813 groups = {},
@@ -829,7 +833,7 @@ def test_default_properties_get_added_properly(self, patch_decide):
829833 patch_decide .return_value = {
830834 "featureFlags" : {"beta-feature" : "random-variant" , "alpha-feature" : True , "off-feature" : False }
831835 }
832- client = Client (FAKE_TEST_API_KEY , on_error = self .set_fail , disable_geoip = False )
836+ client = Client (FAKE_TEST_API_KEY , host = "http://app2.posthog.com" , on_error = self .set_fail , disable_geoip = False )
833837 client .get_feature_flag (
834838 "random_key" ,
835839 "some_id" ,
@@ -839,7 +843,7 @@ def test_default_properties_get_added_properly(self, patch_decide):
839843 )
840844 patch_decide .assert_called_with (
841845 "random_key" ,
842- None ,
846+ "http://app2.posthog.com" ,
843847 timeout = 10 ,
844848 distinct_id = "some_id" ,
845849 groups = {"company" : "id:5" , "instance" : "app.posthog.com" },
@@ -865,7 +869,7 @@ def test_default_properties_get_added_properly(self, patch_decide):
865869 )
866870 patch_decide .assert_called_with (
867871 "random_key" ,
868- None ,
872+ "http://app2.posthog.com" ,
869873 timeout = 10 ,
870874 distinct_id = "some_id" ,
871875 groups = {"company" : "id:5" , "instance" : "app.posthog.com" },
@@ -882,7 +886,7 @@ def test_default_properties_get_added_properly(self, patch_decide):
882886 client .get_all_flags_and_payloads ("some_id" , groups = {}, person_properties = None , group_properties = None )
883887 patch_decide .assert_called_with (
884888 "random_key" ,
885- None ,
889+ "http://app2.posthog.com" ,
886890 timeout = 10 ,
887891 distinct_id = "some_id" ,
888892 groups = {},
0 commit comments