From dc9dc45ae638e3ae5384ef4583c722e2b4efdbc9 Mon Sep 17 00:00:00 2001 From: Jonathan Leroy Date: Mon, 2 Nov 2020 18:00:48 +0100 Subject: [PATCH] Fixes tests after merging of #620 --- tests/fixtures/gandi-no-changes.json | 9 +++++++++ tests/test_octodns_provider_gandi.py | 12 +++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/fixtures/gandi-no-changes.json b/tests/fixtures/gandi-no-changes.json index 1154628..b018785 100644 --- a/tests/fixtures/gandi-no-changes.json +++ b/tests/fixtures/gandi-no-changes.json @@ -46,6 +46,15 @@ "unit.tests." ] }, + { + "rrset_type": "DNAME", + "rrset_ttl": 300, + "rrset_name": "dname", + "rrset_href": "https://api.gandi.net/v5/livedns/domains/unit.tests/records/dname/DNAME", + "rrset_values": [ + "unit.tests." + ] + }, { "rrset_type": "CNAME", "rrset_ttl": 3600, diff --git a/tests/test_octodns_provider_gandi.py b/tests/test_octodns_provider_gandi.py index a818919..3cee392 100644 --- a/tests/test_octodns_provider_gandi.py +++ b/tests/test_octodns_provider_gandi.py @@ -116,7 +116,7 @@ class TestGandiProvider(TestCase): zone = Zone('unit.tests.', []) provider.populate(zone) - self.assertEquals(13, len(zone.records)) + self.assertEquals(14, len(zone.records)) changes = self.expected.changes(zone, provider) self.assertEquals(0, len(changes)) @@ -133,7 +133,7 @@ class TestGandiProvider(TestCase): provider.populate(zone) self.assertEquals(11, len(zone.records)) changes = self.expected.changes(zone, provider) - self.assertEquals(23, len(changes)) + self.assertEquals(24, len(changes)) # 2nd populate makes no network calls/all from cache again = Zone('unit.tests.', []) @@ -226,6 +226,12 @@ class TestGandiProvider(TestCase): 'rrset_type': 'CNAME', 'rrset_values': ['unit.tests.'] }), + call('POST', '/livedns/domains/unit.tests/records', data={ + 'rrset_name': 'dname', + 'rrset_ttl': 300, + 'rrset_type': 'DNAME', + 'rrset_values': ['unit.tests.'] + }), call('POST', '/livedns/domains/unit.tests/records', data={ 'rrset_name': 'cname', 'rrset_ttl': 300, @@ -270,7 +276,7 @@ class TestGandiProvider(TestCase): }) ]) # expected number of total calls - self.assertEquals(16, provider._client._request.call_count) + self.assertEquals(17, provider._client._request.call_count) provider._client._request.reset_mock()