|
18 | 18 | [ |
19 | 19 | # These are pairs that we don't like and we raise. |
20 | 20 | ({"host": "", "port": ""}, True, None), |
| 21 | + ({"host": None, "port": None}, True, None), |
21 | 22 | ({"host": "", "port": "string"}, True, None), |
22 | 23 | ({"host": "string", "port": "string"}, True, None), |
23 | 24 | # When `host` is not a URL. |
|
26 | 27 | ({"host": "localhost", "port": 12345}, False, "http://localhost:12345"), |
27 | 28 | ({"host": "localhost", "port": "12345"}, False, "http://localhost:12345"), |
28 | 29 | ({"host": "localhost", "port": None}, False, "http://localhost"), |
| 30 | + ({"host": "localhost", "port": ""}, False, "http://localhost"), |
| 31 | + ({"host": "foobar.tld", "port": ""}, False, "http://foobar.tld"), |
| 32 | + ({"host": "foobar.tld", "port": None}, False, "http://foobar.tld"), |
| 33 | + ({"host": "foobar.tld", "port": "12345"}, False, "http://foobar.tld:12345"), |
29 | 34 | # When `host` is a URL! |
30 | 35 | ({"host": "http://apiserver"}, False, "http://apiserver"), |
31 | 36 | ( |
@@ -149,7 +154,7 @@ def test_find_resource_children(): |
149 | 154 | client = ArchivesSpaceClient(**AUTH) |
150 | 155 | data = client.get_resource_component_and_children("/repositories/2/resources/1") |
151 | 156 |
|
152 | | - assert type(data) == dict |
| 157 | + assert isinstance(data, dict) |
153 | 158 | assert len(data["children"]) == 2 |
154 | 159 | assert data["has_children"] is True |
155 | 160 | assert data["title"] == "Test fonds" |
|
0 commit comments