Add tests for TinyDNS AAAA records

This commit is contained in:
Andy Hawkins
2019-04-12 21:30:45 +01:00
parent a10cab351b
commit 3b98f3e0e1
2 changed files with 15 additions and 2 deletions
+12 -2
View File
@@ -20,7 +20,7 @@ class TestTinyDnsFileSource(TestCase):
def test_populate_normal(self):
got = Zone('example.com.', [])
self.source.populate(got)
self.assertEquals(14, len(got.records))
self.assertEquals(16, len(got.records))
expected = Zone('example.com.', [])
for name, data in (
@@ -101,6 +101,16 @@ class TestTinyDnsFileSource(TestCase):
'ttl': 3600,
'value': 'nottl test TXT',
}),
('ipv6-3', {
'type': 'AAAA',
'ttl': 300,
'value': '2a02:1348:017c:d5d0:0024:19ff:fef3:5742',
}),
('ipv6-6', {
'type': 'AAAA',
'ttl': 3600,
'value': '2a02:1348:017c:d5d0:0024:19ff:fef3:5743',
}),
):
record = Record.new(expected, name, data)
expected.add_record(record)
@@ -188,4 +198,4 @@ class TestTinyDnsFileSource(TestCase):
def test_ignores_subs(self):
got = Zone('example.com.', ['sub'])
self.source.populate(got)
self.assertEquals(13, len(got.records))
self.assertEquals(15, len(got.records))
Regular → Executable
+3
View File
@@ -50,3 +50,6 @@ Ccname.other.foo:www.other.foo
'example.com:test TXT:300
'colon.example.com:test \072 TXT:300
'nottl.example.com:nottl test TXT
3ipv6-3.example.com:2a021348017cd5d0002419fffef35742:300
6ipv6-6.example.com:2a021348017cd5d0002419fffef35743