@@ -62,12 +62,12 @@ class TestGlobalPromptTemplates:
6262 def test_create_global_prompt (self , respx_mock : MockRouter , prompt_template_response ):
6363 """Test creating a global prompt template."""
6464 # Mock the query API (for uniqueness check)
65- query_route = respx_mock .post ("http://localtest :8088/templates/query" ).mock (
65+ query_route = respx_mock .post ("http://fake.test :8088/templates/query" ).mock (
6666 return_value = httpx .Response (200 , json = {"templates" : []})
6767 )
6868
6969 # Mock the create API
70- create_route = respx_mock .post ("http://localtest :8088/templates" ).mock (
70+ create_route = respx_mock .post ("http://fake.test :8088/templates" ).mock (
7171 return_value = httpx .Response (200 , json = prompt_template_response )
7272 )
7373
@@ -80,7 +80,7 @@ def test_create_global_prompt(self, respx_mock: MockRouter, prompt_template_resp
8080
8181 def test_get_global_prompt_by_id (self , respx_mock : MockRouter , prompt_template_response ):
8282 """Test retrieving a global prompt template by ID."""
83- get_route = respx_mock .get (f"http://localtest :8088/templates/{ prompt_template_response ['id' ]} " ).mock (
83+ get_route = respx_mock .get (f"http://fake.test :8088/templates/{ prompt_template_response ['id' ]} " ).mock (
8484 return_value = httpx .Response (200 , json = prompt_template_response )
8585 )
8686
@@ -92,7 +92,7 @@ def test_get_global_prompt_by_id(self, respx_mock: MockRouter, prompt_template_r
9292
9393 def test_get_global_prompt_by_name (self , respx_mock : MockRouter , prompt_template_response ):
9494 """Test retrieving a global prompt template by name."""
95- query_route = respx_mock .post ("http://localtest :8088/templates/query" ).mock (
95+ query_route = respx_mock .post ("http://fake.test :8088/templates/query" ).mock (
9696 return_value = httpx .Response (
9797 200 , json = {"templates" : [prompt_template_response ], "next_starting_token" : None }
9898 )
@@ -106,7 +106,7 @@ def test_get_global_prompt_by_name(self, respx_mock: MockRouter, prompt_template
106106
107107 def test_list_global_prompts (self , respx_mock : MockRouter , prompt_template_response ):
108108 """Test listing global prompt templates."""
109- query_route = respx_mock .post ("http://localtest :8088/templates/query" ).mock (
109+ query_route = respx_mock .post ("http://fake.test :8088/templates/query" ).mock (
110110 return_value = httpx .Response (
111111 200 , json = {"templates" : [prompt_template_response ], "next_starting_token" : None }
112112 )
@@ -120,7 +120,7 @@ def test_list_global_prompts(self, respx_mock: MockRouter, prompt_template_respo
120120
121121 def test_delete_global_prompt_by_id (self , respx_mock : MockRouter ):
122122 """Test deleting a global prompt template by ID."""
123- delete_route = respx_mock .delete ("http://localtest :8088/templates/template-id-123" ).mock (
123+ delete_route = respx_mock .delete ("http://fake.test :8088/templates/template-id-123" ).mock (
124124 return_value = httpx .Response (200 , json = {"message" : "Template deleted successfully" })
125125 )
126126
@@ -131,14 +131,14 @@ def test_delete_global_prompt_by_id(self, respx_mock: MockRouter):
131131 def test_delete_global_prompt_by_name (self , respx_mock : MockRouter , prompt_template_response ):
132132 """Test deleting a global prompt template by name."""
133133 # Mock query to find template by name
134- query_route = respx_mock .post ("http://localtest :8088/templates/query" ).mock (
134+ query_route = respx_mock .post ("http://fake.test :8088/templates/query" ).mock (
135135 return_value = httpx .Response (
136136 200 , json = {"templates" : [prompt_template_response ], "next_starting_token" : None }
137137 )
138138 )
139139
140140 # Mock delete
141- delete_route = respx_mock .delete (f"http://localtest :8088/templates/{ prompt_template_response ['id' ]} " ).mock (
141+ delete_route = respx_mock .delete (f"http://fake.test :8088/templates/{ prompt_template_response ['id' ]} " ).mock (
142142 return_value = httpx .Response (200 , json = {"message" : "Template deleted successfully" })
143143 )
144144
@@ -151,13 +151,13 @@ def test_create_prompt_with_unique_name(self, respx_mock: MockRouter, prompt_tem
151151 """Test that duplicate names get auto-incremented."""
152152 # Mock query to find existing template
153153 existing_template = {** prompt_template_response , "name" : "test-template" }
154- query_route = respx_mock .post ("http://localtest :8088/templates/query" ).mock (
154+ query_route = respx_mock .post ("http://fake.test :8088/templates/query" ).mock (
155155 return_value = httpx .Response (200 , json = {"templates" : [existing_template ], "next_starting_token" : None })
156156 )
157157
158158 # Mock create with new unique name
159159 new_template = {** prompt_template_response , "name" : "test-template (1)" }
160- create_route = respx_mock .post ("http://localtest :8088/templates" ).mock (
160+ create_route = respx_mock .post ("http://fake.test :8088/templates" ).mock (
161161 return_value = httpx .Response (200 , json = new_template )
162162 )
163163
0 commit comments