File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
_test_unstructured_client/unit Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -198,23 +198,20 @@ def test_unit_clean_server_url_fixes_malformed_paid_api_url(server_url: str):
198198
199199
200200@pytest .mark .parametrize (
201- "server_url" ,
201+ "server_url,expected_url " ,
202202 [
203- # -- well-formed url --
204- "http://localhost:8000" ,
205- # -- common malformed urls --
206- "localhost:8000" ,
207- "localhost:8000/general/v0/general" ,
208- "http://localhost:8000/general/v0/general" ,
203+ ("http://localhost:8000" , "http://localhost:8000" ),
204+ ("localhost:8000" , "http://localhost:8000" ),
205+ ("localhost:8000/general/v0/general" , "http://localhost:8000/general/v0/general" ),
206+ ("http://localhost:8000/general/v0/general" , "http://localhost:8000/general/v0/general" ),
209207 ],
210208)
211- def test_unit_clean_server_url_fixes_malformed_localhost_url (server_url : str ):
209+ def test_unit_clean_server_url_fixes_non_unst_domain_url (server_url : str , expected_url : str ):
212210 client = UnstructuredClient (
213211 server_url = server_url ,
214212 api_key_auth = FAKE_KEY ,
215213 )
216- assert client .general .sdk_configuration .server_url == "http://localhost:8000"
217-
214+ assert client .general .sdk_configuration .server_url == expected_url
218215
219216@pytest .mark .parametrize (
220217 "server_url" ,
You can’t perform that action at this time.
0 commit comments