Browse Source

Fixes tests after merging of #620

pull/619/head
Jonathan Leroy 5 years ago
parent
commit
dc9dc45ae6
No known key found for this signature in database GPG Key ID: 7A0BCBE3934842EA
2 changed files with 18 additions and 3 deletions
  1. +9
    -0
      tests/fixtures/gandi-no-changes.json
  2. +9
    -3
      tests/test_octodns_provider_gandi.py

+ 9
- 0
tests/fixtures/gandi-no-changes.json View File

@ -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,


+ 9
- 3
tests/test_octodns_provider_gandi.py View File

@ -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()


Loading…
Cancel
Save