mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
break record tests into individual files
This commit is contained in:
31
tests/test_octodns_record_target.py
Normal file
31
tests/test_octodns_record_target.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
from unittest import TestCase
|
||||
|
||||
from octodns.record.alias import AliasRecord
|
||||
from octodns.record.target import _TargetValue
|
||||
from octodns.zone import Zone
|
||||
|
||||
|
||||
class TestRecordTarget(TestCase):
|
||||
def test_target_rdata_text(self):
|
||||
|
||||
# anything goes, we're a noop
|
||||
for s in (
|
||||
None,
|
||||
'',
|
||||
'word',
|
||||
42,
|
||||
42.43,
|
||||
'1.2.3',
|
||||
'some.words.that.here',
|
||||
'1.2.word.4',
|
||||
'1.2.3.4',
|
||||
):
|
||||
self.assertEqual(s, _TargetValue.parse_rdata_text(s))
|
||||
|
||||
zone = Zone('unit.tests.', [])
|
||||
a = AliasRecord(zone, 'a', {'ttl': 42, 'value': 'some.target.'})
|
||||
self.assertEqual('some.target.', a.value.rdata_text)
|
Reference in New Issue
Block a user