mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-11-21 11:18:38 +00:00
Fix test error.
This commit is contained in:
parent
9a8f23c614
commit
7ee536e99f
1 changed files with 8 additions and 0 deletions
|
@ -41,6 +41,14 @@ class ApplicationTests(AsyncTestCaseWithTimeout):
|
|||
super().setUp()
|
||||
self._environ = {}
|
||||
|
||||
def tearDown(self):
|
||||
super().tearDown()
|
||||
for name, value in self._environ.items():
|
||||
if value is not None:
|
||||
os.environ[name] = value
|
||||
else:
|
||||
os.environ.pop(name, None)
|
||||
|
||||
def setenv(self, name, value):
|
||||
self._environ.setdefault(name, os.environ.pop(name, None))
|
||||
os.environ[name] = value
|
||||
|
|
Loading…
Reference in a new issue