@@ -33,7 +33,7 @@ class TestPrompts(unittest.TestCase):
3333 }
3434
3535 def create_mock_posthog (
36- self , personal_api_key = "phx_test_key" , host = "https://app .posthog.com"
36+ self , personal_api_key = "phx_test_key" , host = "https://us .posthog.com"
3737 ):
3838 """Create a mock PostHog client."""
3939 mock = MagicMock ()
@@ -61,7 +61,7 @@ def test_successfully_fetch_a_prompt(self, mock_get_session):
6161 call_args = mock_get .call_args
6262 self .assertEqual (
6363 call_args [0 ][0 ],
64- "https://app .posthog.com/api/environments/@current/llm_prompts/name/test-prompt/" ,
64+ "https://us .posthog.com/api/environments/@current/llm_prompts/name/test-prompt/" ,
6565 )
6666 self .assertIn ("Authorization" , call_args [1 ]["headers" ])
6767 self .assertEqual (
@@ -333,7 +333,7 @@ def test_url_encode_prompt_names_with_special_characters(self, mock_get_session)
333333 call_args = mock_get .call_args
334334 self .assertEqual (
335335 call_args [0 ][0 ],
336- "https://app .posthog.com/api/environments/@current/llm_prompts/name/prompt%20with%20spaces%2Fand%2Fslashes/" ,
336+ "https://us .posthog.com/api/environments/@current/llm_prompts/name/prompt%20with%20spaces%2Fand%2Fslashes/" ,
337337 )
338338
339339 @patch ("posthog.ai.prompts._get_session" )
@@ -350,7 +350,7 @@ def test_work_with_direct_options_no_posthog_client(self, mock_get_session):
350350 call_args = mock_get .call_args
351351 self .assertEqual (
352352 call_args [0 ][0 ],
353- "https://app .posthog.com/api/environments/@current/llm_prompts/name/test-prompt/" ,
353+ "https://us .posthog.com/api/environments/@current/llm_prompts/name/test-prompt/" ,
354354 )
355355 self .assertEqual (
356356 call_args [1 ]["headers" ]["Authorization" ], "Bearer phx_direct_key"
0 commit comments