From 0d5a1b92d027b612f4a4af7273dd0e679f3a846a Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Wed, 22 Nov 2023 14:47:34 -0800 Subject: [PATCH 1/2] Exclude octodns section from expected --- tests/test_octodns_provider_mythicbeasts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_octodns_provider_mythicbeasts.py b/tests/test_octodns_provider_mythicbeasts.py index 4c69565..7261ea2 100644 --- a/tests/test_octodns_provider_mythicbeasts.py +++ b/tests/test_octodns_provider_mythicbeasts.py @@ -460,7 +460,7 @@ def test_apply(self): 1, len([c for c in plan.changes if isinstance(c, Delete)]) ) self.assertEqual( - 16, len([c for c in plan.changes if isinstance(c, Create)]) + 14, len([c for c in plan.changes if isinstance(c, Create)]) ) - self.assertEqual(18, provider.apply(plan)) + self.assertEqual(16, provider.apply(plan)) self.assertTrue(plan.exists) From 8717ed4f10a3f09ea70e4533e7754e2c1bcb244b Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Wed, 22 Nov 2023 14:49:17 -0800 Subject: [PATCH 2/2] Better solution to octodns inclusion --- tests/test_octodns_provider_mythicbeasts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_octodns_provider_mythicbeasts.py b/tests/test_octodns_provider_mythicbeasts.py index 7261ea2..e8b60d5 100644 --- a/tests/test_octodns_provider_mythicbeasts.py +++ b/tests/test_octodns_provider_mythicbeasts.py @@ -440,6 +440,7 @@ def test_apply(self): for record in list(self.expected.records): data = {'type': record._type} data.update(record.data) + data.pop('octodns', None) wanted.add_record(Record.new(wanted, record.name, data)) wanted.add_record( @@ -460,7 +461,7 @@ def test_apply(self): 1, len([c for c in plan.changes if isinstance(c, Delete)]) ) self.assertEqual( - 14, len([c for c in plan.changes if isinstance(c, Create)]) + 16, len([c for c in plan.changes if isinstance(c, Create)]) ) - self.assertEqual(16, provider.apply(plan)) + self.assertEqual(18, provider.apply(plan)) self.assertTrue(plan.exists)