From 7ee536e99fd9f8491a0185ddb6ddff71c6c4315c Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Wed, 24 Mar 2021 06:30:26 -0400 Subject: [PATCH] Fix test error. --- tests/test_mixins.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_mixins.py b/tests/test_mixins.py index f0955ca..6e86346 100644 --- a/tests/test_mixins.py +++ b/tests/test_mixins.py @@ -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