From 523a188e1decc9a60a114c6d85fad4f3d62e9dfd Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Fri, 1 Dec 2023 10:46:58 -0800 Subject: [PATCH] explicit test for values and value --- tests/test_octodns_record.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_octodns_record.py b/tests/test_octodns_record.py index 86f92e5..c85341f 100644 --- a/tests/test_octodns_record.py +++ b/tests/test_octodns_record.py @@ -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'}