summaryrefslogtreecommitdiff
path: root/macaroonbakery/tests/test_httpbakery.py
diff options
context:
space:
mode:
Diffstat (limited to 'macaroonbakery/tests/test_httpbakery.py')
-rw-r--r--macaroonbakery/tests/test_httpbakery.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/macaroonbakery/tests/test_httpbakery.py b/macaroonbakery/tests/test_httpbakery.py
new file mode 100644
index 0000000..4aac850
--- /dev/null
+++ b/macaroonbakery/tests/test_httpbakery.py
@@ -0,0 +1,16 @@
+from unittest import TestCase
+
+from macaroonbakery.httpbakery import WebBrowserInteractionInfo
+
+
+class TestWebBrowserInteractionInfo(TestCase):
+
+ def test_from_dict(self):
+ info_dict = {
+ 'VisitURL': 'https://example.com/visit',
+ 'WaitTokenURL': 'https://example.com/wait'}
+ interaction_info = WebBrowserInteractionInfo.from_dict(info_dict)
+ self.assertEqual(
+ interaction_info.visit_url, 'https://example.com/visit')
+ self.assertEqual(
+ interaction_info.wait_token_url, 'https://example.com/wait')