Commit c1539b60 authored by Anastasios Pandis's avatar Anastasios Pandis
Browse files

fixed test_ip_without_identity_service_raises to monkeypatch...

fixed test_ip_without_identity_service_raises to monkeypatch identity_service_url, preventing network calls
parent 63794097
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -83,10 +83,11 @@ class TestCamaraToOai3gppTransformation:
        # locationType must NOT appear in the JSON
        assert "locationType" not in json_str

    def test_ip_without_identity_service_raises(self):
    def test_ip_without_identity_service_raises(self, monkeypatch):
        """Using ipv4Address without identity_service_url (NEF UE-ID API) must raise an error."""
        from sunrise6g_opensdk.network.adapters.oai.client import OaiValidationError

        monkeypatch.setattr(network_client_unit, "identity_service_url", None)
        with pytest.raises(OaiValidationError, match="identity_service_url"):
            network_client_unit._build_monitoring_event_subscription(
                retrieve_location_request=camara_payload_by_ip