diff options
author | Colin Watson <cjwatson@debian.org> | 2020-01-29 17:13:24 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-01-29 17:13:24 +0000 |
commit | 1f71066d3cd63e829ce094b1298873b0e34ae204 (patch) | |
tree | b041c617f09ccd92b511df94e918dfe165faffca /macaroonbakery/tests/test_client.py | |
parent | 64f7b99b10a70e8341b4ddf5c9c726722f005ebe (diff) |
New upstream version 1.3.0
Diffstat (limited to 'macaroonbakery/tests/test_client.py')
-rw-r--r-- | macaroonbakery/tests/test_client.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/macaroonbakery/tests/test_client.py b/macaroonbakery/tests/test_client.py index b03bafa..6437a54 100644 --- a/macaroonbakery/tests/test_client.py +++ b/macaroonbakery/tests/test_client.py @@ -4,7 +4,6 @@ import base64 import datetime import json import threading -from unittest import TestCase import macaroonbakery.bakery as bakery import macaroonbakery.checkers as checkers @@ -13,6 +12,10 @@ import pymacaroons import requests import macaroonbakery._utils as utils +from fixtures import ( + EnvironmentVariable, + TestWithFixtures, +) from httmock import HTTMock, urlmatch from six.moves.urllib.parse import parse_qs from six.moves.urllib.request import Request @@ -26,7 +29,14 @@ AGES = datetime.datetime.utcnow() + datetime.timedelta(days=1) TEST_OP = bakery.Op(entity='test', action='test') -class TestClient(TestCase): +class TestClient(TestWithFixtures): + 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. + self.useFixture(EnvironmentVariable('http_proxy')) + self.useFixture(EnvironmentVariable('HTTP_PROXY')) + def test_single_service_first_party(self): b = new_bakery('loc', None, None) |