Browse Source

explicit test for values and value

pull/1113/head
Ross McFarland 2 years ago
parent
commit
523a188e1d
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      tests/test_octodns_record.py

+ 14
- 0
tests/test_octodns_record.py 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'}


Loading…
Cancel
Save