diff options
Diffstat (limited to 'macaroonbakery/tests/test_keyring.py')
-rw-r--r-- | macaroonbakery/tests/test_keyring.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/macaroonbakery/tests/test_keyring.py b/macaroonbakery/tests/test_keyring.py index 438ab1b..3503145 100644 --- a/macaroonbakery/tests/test_keyring.py +++ b/macaroonbakery/tests/test_keyring.py @@ -2,11 +2,11 @@ # Licensed under the LGPLv3, see LICENCE file for details. import unittest -from httmock import urlmatch, HTTMock - -import macaroonbakery as bakery +import macaroonbakery.bakery as bakery import macaroonbakery.httpbakery as httpbakery +from httmock import HTTMock, urlmatch + class TestKeyRing(unittest.TestCase): @@ -19,7 +19,7 @@ class TestKeyRing(unittest.TestCase): 'status_code': 200, 'content': { 'Version': bakery.LATEST_VERSION, - 'PublicKey': key.public_key.encode().decode('utf-8') + 'PublicKey': str(key.public_key), } } @@ -41,7 +41,7 @@ class TestKeyRing(unittest.TestCase): 'status_code': 200, 'content': { 'Version': bakery.LATEST_VERSION, - 'PublicKey': key.public_key.encode().decode('utf-8') + 'PublicKey': str(key.public_key), } } @@ -64,7 +64,7 @@ class TestKeyRing(unittest.TestCase): return { 'status_code': 200, 'content': { - 'PublicKey': key.public_key.encode().decode('utf-8') + 'PublicKey': str(key.public_key), } } @@ -79,7 +79,7 @@ class TestKeyRing(unittest.TestCase): def test_allow_insecure(self): kr = httpbakery.ThirdPartyLocator() - with self.assertRaises(bakery.error.ThirdPartyInfoNotFound): + with self.assertRaises(bakery.ThirdPartyInfoNotFound): kr.third_party_info('http://0.1.2.3/') def test_fallback(self): @@ -96,7 +96,7 @@ class TestKeyRing(unittest.TestCase): return { 'status_code': 200, 'content': { - 'PublicKey': key.public_key.encode().decode('utf-8') + 'PublicKey': str(key.public_key), } } |