From 484a5118f438f8e00ce29027e6b2af167aae1eb5 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 5 Oct 2019 09:10:59 -0700 Subject: [PATCH] MythicBeastsProvider python3 --- octodns/provider/mythicbeasts.py | 2 +- tests/test_octodns_provider_mythicbeasts.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/octodns/provider/mythicbeasts.py b/octodns/provider/mythicbeasts.py index 17029db..b255a74 100644 --- a/octodns/provider/mythicbeasts.py +++ b/octodns/provider/mythicbeasts.py @@ -328,7 +328,7 @@ class MythicBeastsProvider(BaseProvider): exists = True for line in resp.content.splitlines(): - match = MythicBeastsProvider.RE_POPLINE.match(line) + match = MythicBeastsProvider.RE_POPLINE.match(line.decode("utf-8")) if match is None: self.log.debug('failed to match line: %s', line) diff --git a/tests/test_octodns_provider_mythicbeasts.py b/tests/test_octodns_provider_mythicbeasts.py index b93d46e..498b408 100644 --- a/tests/test_octodns_provider_mythicbeasts.py +++ b/tests/test_octodns_provider_mythicbeasts.py @@ -441,11 +441,11 @@ class TestMythicBeastsProvider(TestCase): plan = provider.plan(wanted) # Octo ignores NS records (15-1) - self.assertEquals(1, len(filter(lambda u: isinstance(u, Update), - plan.changes))) - self.assertEquals(1, len(filter(lambda d: isinstance(d, Delete), - plan.changes))) - self.assertEquals(14, len(filter(lambda c: isinstance(c, Create), - plan.changes))) + self.assertEquals(1, len(list(filter( + lambda u: isinstance(u, Update), plan.changes)))) + self.assertEquals(1, len(list(filter( + lambda d: isinstance(d, Delete), plan.changes)))) + self.assertEquals(14, len(list(filter( + lambda c: isinstance(c, Create), plan.changes)))) self.assertEquals(16, provider.apply(plan)) self.assertTrue(plan.exists)