only update records and notify if IP has changed
Build and Push Container / build-and-push (push) Successful in 1m19s
Build and Push Container / build-and-push (push) Successful in 1m19s
This commit is contained in:
@@ -85,7 +85,7 @@ class TestListDnsPolicies:
|
||||
assert policies[0]["ipv4Address"] == "1.2.3.4"
|
||||
|
||||
mock_session.get.assert_called_once_with(
|
||||
"https://unifi.example.com/api/s/site123/dns/policies",
|
||||
"https://unifi.example.com/api/sites/site123/dns/policies",
|
||||
verify=False,
|
||||
)
|
||||
|
||||
@@ -119,7 +119,7 @@ class TestGetSession:
|
||||
|
||||
mock_session_cls.assert_called_once()
|
||||
mock_session.headers.update.assert_called_once_with(
|
||||
{"X-CSRF-Token": "my-api-token"}
|
||||
{"X-API-Key": "my-api-token"}
|
||||
)
|
||||
assert session is mock_session
|
||||
|
||||
@@ -311,7 +311,7 @@ class TestUpdateRecords:
|
||||
|
||||
mock_session.get.assert_called_once()
|
||||
call_url = mock_session.get.call_args[0][0]
|
||||
assert "https://unifi.example.com/api/s/site123/dns/policies" == call_url
|
||||
assert "https://unifi.example.com/proxy/network/integration/v1/sites/site123/dns/policies" == call_url
|
||||
|
||||
def test_update_records_raises_on_post_failure(self) -> None:
|
||||
mock_session = MagicMock()
|
||||
|
||||
Reference in New Issue
Block a user