File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,17 @@ def test_get_murfey_url(
4040 with patch ("murfey.instrument_server.api.config" , mock_client_configuration ):
4141 known_server = _get_murfey_url ()
4242
43- # Check that the components of the result match those in the config
44- parsed_server = urlparse ( known_server )
43+ # Prepend 'http://' to config URLs that don't have it for the comparison
44+ # Otherwise, urlparse stores it under the 'path' attribute
4545 original_url = str (mock_client_configuration ["Murfey" ].get ("server" ))
4646 if not original_url .startswith (("http://" , "https://" )):
4747 original_url = f"http://{ original_url } "
4848 parsed_original = urlparse (original_url )
49+ parsed_server = urlparse (known_server )
50+ # Check that the components of the result match those in the config
4951 assert parsed_server .scheme in ("http" , "https" )
52+ assert parsed_server .hostname == parsed_original .hostname
53+ assert parsed_server .port == parsed_original .port
5054 assert parsed_server .netloc == parsed_original .netloc
5155 assert parsed_server .path == parsed_original .path
5256
You can’t perform that action at this time.
0 commit comments