summaryrefslogtreecommitdiff
path: root/macaroonbakery
diff options
context:
space:
mode:
Diffstat (limited to 'macaroonbakery')
-rw-r--r--macaroonbakery/tests/test_bakery.py19
-rw-r--r--macaroonbakery/tests/test_client.py7
2 files changed, 1 insertions, 25 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,
diff --git a/macaroonbakery/tests/test_client.py b/macaroonbakery/tests/test_client.py
index baafeed..bfc7807 100644
--- a/macaroonbakery/tests/test_client.py
+++ b/macaroonbakery/tests/test_client.py
@@ -3,7 +3,6 @@
import base64
import datetime
import json
-import os
import threading
from unittest import TestCase
@@ -28,12 +27,6 @@ TEST_OP = bakery.Op(entity='test', action='test')
class TestClient(TestCase):
- def setUp(self):
- super(TestClient, 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 test_single_service_first_party(self):
b = new_bakery('loc', None, None)