Repository: python-scim/scim2-tester

Issue:
Incorrect domains are not properly handled
Unreachable domains should raise a correct error instead of raising an exception:

```python
$ python scim2_tester/checker.py "http://invalid.test"
Traceback (most recent call last):
  File "/home/eloi/dev/yaal/scim2-tester/scim2_tester/checker.py", line 104, in <module>
    results = check_server(scim)
              ^^^^^^^^^^^^^^^^^^
  File "/home/eloi/dev/yaal/scim2-tester/scim2_tester/checker.py", line 82, in check_server
    for resource_type in resource_types:
                         ^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
```

Hints from issue comments:

Solution patch:
diff --git a/doc/changelog.rst b/doc/changelog.rst
index 5e1a5b2..8091c39 100644
--- a/doc/changelog.rst
+++ b/doc/changelog.rst
@@ -1,6 +1,13 @@
 Changelog
 =========
 
+[0.1.4] - Unreleased
+--------------------
+
+Fixed
+^^^^^
+- Invalid domains and network errors are properly handled. #6
+
 [0.1.3] - 2024-07-25
 --------------------
 
diff --git a/scim2_tester/checker.py b/scim2_tester/checker.py
index 055477b..5115f95 100644
--- a/scim2_tester/checker.py
+++ b/scim2_tester/checker.py
@@ -79,7 +79,7 @@ def check_server(scim: SCIMClient) -> List[CheckResult]:
     results.append(result)
 
     # Resource checks
-    for resource_type in resource_types:
+    for resource_type in resource_types or []:
         results.extend(
             check_resource_type(scim, resource_type, service_provider_config)
         )


Test patch:
diff --git a/tests/test_network.py b/tests/test_network.py
new file mode 100644
index 0000000..fc7385f
--- /dev/null
+++ b/tests/test_network.py
@@ -0,0 +1,15 @@
+from httpx import Client
+from scim2_client import SCIMClient
+from scim2_models import Group
+from scim2_models import User
+
+from scim2_tester.checker import check_server
+
+
+def test_unreachable_host():
+    """Test reaching a invalid URL."""
+
+    client = Client(base_url="https://invalid.test")
+    scim = SCIMClient(client, resource_types=(User, Group))
+
+    check_server(scim)