Browse Source

Add tests for TinyDNS AAAA records

pull/343/head
Andy Hawkins 7 years ago
parent
commit
3b98f3e0e1
2 changed files with 15 additions and 2 deletions
  1. +12
    -2
      tests/test_octodns_source_tinydns.py
  2. +3
    -0
      tests/zones/tinydns/example.com

+ 12
- 2
tests/test_octodns_source_tinydns.py View File

@ -20,7 +20,7 @@ class TestTinyDnsFileSource(TestCase):
def test_populate_normal(self): def test_populate_normal(self):
got = Zone('example.com.', []) got = Zone('example.com.', [])
self.source.populate(got) self.source.populate(got)
self.assertEquals(14, len(got.records))
self.assertEquals(16, len(got.records))
expected = Zone('example.com.', []) expected = Zone('example.com.', [])
for name, data in ( for name, data in (
@ -101,6 +101,16 @@ class TestTinyDnsFileSource(TestCase):
'ttl': 3600, 'ttl': 3600,
'value': 'nottl test TXT', '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) record = Record.new(expected, name, data)
expected.add_record(record) expected.add_record(record)
@ -188,4 +198,4 @@ class TestTinyDnsFileSource(TestCase):
def test_ignores_subs(self): def test_ignores_subs(self):
got = Zone('example.com.', ['sub']) got = Zone('example.com.', ['sub'])
self.source.populate(got) self.source.populate(got)
self.assertEquals(13, len(got.records))
self.assertEquals(15, len(got.records))

+ 3
- 0
tests/zones/tinydns/example.com View File

@ -50,3 +50,6 @@ Ccname.other.foo:www.other.foo
'example.com:test TXT:300 'example.com:test TXT:300
'colon.example.com:test \072 TXT:300 'colon.example.com:test \072 TXT:300
'nottl.example.com:nottl test TXT 'nottl.example.com:nottl test TXT
3ipv6-3.example.com:2a021348017cd5d0002419fffef35742:300
6ipv6-6.example.com:2a021348017cd5d0002419fffef35743

Loading…
Cancel
Save