Browse Source

Update EasyDNS tests and fixtures for NULL SRV records

Thanks to @actazen for assisting with API tests to confirm support
pull/668/head
Mark Tearle 5 years ago
parent
commit
909c7ad7e8
2 changed files with 27 additions and 5 deletions
  1. +24
    -2
      tests/fixtures/easydns-records.json
  2. +3
    -3
      tests/test_octodns_provider_easydns.py

+ 24
- 2
tests/fixtures/easydns-records.json View File

@ -264,10 +264,32 @@
"rdata": "v=DKIM1;k=rsa;s=email;h=sha256;p=A\/kinda+of\/long\/string+with+numb3rs",
"geozone_id": "0",
"last_mod": "2020-01-01 01:01:01"
},
{
"id": "12340025",
"domain": "unit.tests",
"host": "_imap._tcp",
"ttl": "600",
"prio": "0",
"type": "SRV",
"rdata": "0 0 0 .",
"geozone_id": "0",
"last_mod": "2020-01-01 01:01:01"
},
{
"id": "12340026",
"domain": "unit.tests",
"host": "_pop3._tcp",
"ttl": "600",
"prio": "0",
"type": "SRV",
"rdata": "0 0 0 .",
"geozone_id": "0",
"last_mod": "2020-01-01 01:01:01"
}
],
"count": 24,
"total": 24,
"count": 26,
"total": 26,
"start": 0,
"max": 1000,
"status": 200


+ 3
- 3
tests/test_octodns_provider_easydns.py View File

@ -80,14 +80,14 @@ class TestEasyDNSProvider(TestCase):
text=fh.read())
provider.populate(zone)
self.assertEquals(13, len(zone.records))
self.assertEquals(15, len(zone.records))
changes = self.expected.changes(zone, provider)
self.assertEquals(0, len(changes))
# 2nd populate makes no network calls/all from cache
again = Zone('unit.tests.', [])
provider.populate(again)
self.assertEquals(13, len(again.records))
self.assertEquals(15, len(again.records))
# bust the cache
del provider._zone_records[zone.name]
@ -379,7 +379,7 @@ class TestEasyDNSProvider(TestCase):
self.assertEquals(n, provider.apply(plan))
self.assertFalse(plan.exists)
self.assertEquals(23, provider._client._request.call_count)
self.assertEquals(25, provider._client._request.call_count)
provider._client._request.reset_mock()


Loading…
Cancel
Save