Browse Source

Add tests for escaping semicolons in TinyDNS TXT records

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

+ 7
- 2
tests/test_octodns_source_tinydns.py View File

@ -20,7 +20,7 @@ class TestTinyDnsFileSource(TestCase):
def test_populate_normal(self):
got = Zone('example.com.', [])
self.source.populate(got)
self.assertEquals(16, len(got.records))
self.assertEquals(17, len(got.records))
expected = Zone('example.com.', [])
for name, data in (
@ -111,6 +111,11 @@ class TestTinyDnsFileSource(TestCase):
'ttl': 3600,
'value': '2a02:1348:017c:d5d0:0024:19ff:fef3:5743',
}),
('semicolon', {
'type': 'TXT',
'ttl': 300,
'value': 'v=DKIM1\\; k=rsa\\; p=blah',
}),
):
record = Record.new(expected, name, data)
expected.add_record(record)
@ -198,4 +203,4 @@ class TestTinyDnsFileSource(TestCase):
def test_ignores_subs(self):
got = Zone('example.com.', ['sub'])
self.source.populate(got)
self.assertEquals(15, len(got.records))
self.assertEquals(16, len(got.records))

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

@ -53,3 +53,5 @@ Ccname.other.foo:www.other.foo
3ipv6-3.example.com:2a021348017cd5d0002419fffef35742:300
6ipv6-6.example.com:2a021348017cd5d0002419fffef35743
'semicolon.example.com:v=DKIM1; k=rsa; p=blah:300

Loading…
Cancel
Save