1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

explicit test for values and value

This commit is contained in:
Ross McFarland
2023-12-01 10:46:58 -08:00
parent 4a73c6b6f3
commit 523a188e1d

View File

@@ -251,6 +251,20 @@ class TestRecord(TestCase):
Record.new(self.zone, 'unknown', {'type': 'XXX'})
self.assertTrue('Unknown record type' in str(ctx.exception))
def test_record_new_with_values_and_value(self):
a = Record.new(
self.zone,
'a',
{
'ttl': 44,
'type': 'A',
'value': '1.2.3.4',
'values': ['2.3.4.5', '3.4.5.6'],
},
)
# values is preferred over value when both exist
self.assertEqual(['2.3.4.5', '3.4.5.6'], a.values)
def test_record_copy(self):
a = Record.new(
self.zone, 'a', {'ttl': 44, 'type': 'A', 'value': '1.2.3.4'}