From 37543e6a762f94687a219134c6c9f75b900c93a8 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 5 Oct 2019 09:18:42 -0700 Subject: [PATCH] OvhProvider python3 --- octodns/provider/ovh.py | 2 +- tests/test_octodns_provider_ovh.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/octodns/provider/ovh.py b/octodns/provider/ovh.py index 0187098..a0e47f8 100644 --- a/octodns/provider/ovh.py +++ b/octodns/provider/ovh.py @@ -345,7 +345,7 @@ class OvhProvider(BaseProvider): @staticmethod def _is_valid_dkim_key(key): try: - base64.decodestring(key) + base64.decodestring(bytearray(key, 'utf-8')) except binascii.Error: return False return True diff --git a/tests/test_octodns_provider_ovh.py b/tests/test_octodns_provider_ovh.py index d3f468d..1f41abf 100644 --- a/tests/test_octodns_provider_ovh.py +++ b/tests/test_octodns_provider_ovh.py @@ -428,7 +428,7 @@ class TestOvhProvider(TestCase): ), call(u'/domain/zone/unit.tests/refresh')] - post_mock.assert_has_calls(wanted_calls) + post_mock.assert_has_calls(wanted_calls, any_order=True) # Get for delete calls wanted_get_calls = [ @@ -440,7 +440,7 @@ class TestOvhProvider(TestCase): subDomain=u''), call(u'/domain/zone/unit.tests/record', fieldType=u'A', subDomain='fake')] - get_mock.assert_has_calls(wanted_get_calls) + get_mock.assert_has_calls(wanted_get_calls, any_order=True) # 4 delete calls for update and delete delete_mock.assert_has_calls( [call(u'/domain/zone/unit.tests/record/100'),