diff options
author | Ondřej Nový <onovy@debian.org> | 2018-08-08 09:17:28 +0200 |
---|---|---|
committer | Ondřej Nový <onovy@debian.org> | 2018-08-08 09:17:28 +0200 |
commit | ae33a39d857b367e216f1e80530c09087b108d16 (patch) | |
tree | f1e3d6874fe072cb60f3951fbde1fed5e2a565a0 /macaroonbakery/tests/test_bakery.py | |
parent | 4c050a9d710ec8be375844a45dc2d4cf760dca7a (diff) |
Convert git repository from git-dpm to gbp layout
Diffstat (limited to 'macaroonbakery/tests/test_bakery.py')
-rw-r--r-- | macaroonbakery/tests/test_bakery.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/macaroonbakery/tests/test_bakery.py b/macaroonbakery/tests/test_bakery.py index 1883987..a6c3e58 100644 --- a/macaroonbakery/tests/test_bakery.py +++ b/macaroonbakery/tests/test_bakery.py @@ -1,6 +1,5 @@ # Copyright 2017 Canonical Ltd. # Licensed under the LGPLv3, see LICENCE file for details. -import os from unittest import TestCase import macaroonbakery.httpbakery as httpbakery @@ -146,16 +145,6 @@ def discharge_401(url, request): } -@urlmatch(path='.*/visit') -def visit_200(url, request): - return { - 'status_code': 200, - 'content': { - 'interactive': '/visit' - } - } - - @urlmatch(path='.*/wait') def wait_after_401(url, request): if request.url != 'http://example.com/wait': @@ -182,11 +171,6 @@ def wait_on_error(url, request): class TestBakery(TestCase): - def setUp(self): - super(TestBakery, self).setUp() - # http_proxy would cause requests to talk to the proxy, which is - # unlikely to know how to talk to the test server. - os.environ.pop('http_proxy', None) def assert_cookie_security(self, cookies, name, secure): for cookie in cookies: @@ -255,8 +239,7 @@ class TestBakery(TestCase): def kind(self): return 'unknown' client = httpbakery.Client(interaction_methods=[UnknownInteractor()]) - with HTTMock(first_407_then_200), HTTMock(discharge_401),\ - HTTMock(visit_200): + with HTTMock(first_407_then_200), HTTMock(discharge_401): with self.assertRaises(httpbakery.InteractionError) as exc: requests.get( ID_PATH, |