summaryrefslogtreecommitdiff
path: root/macaroonbakery/tests/test_httpbakery.py
blob: 4aac850b62612372e45dac3b396f23ee0e8a081c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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')