summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-07-02 18:39:25 -0400
committerRuben Pollan <meskio@sindominio.net>2015-07-02 18:39:25 -0400
commit844c9633b7cf24c5cf5785ed7b6a176142b75447 (patch)
treed1b3393dc15ee6f64393129c3e812d99cfb8c85b
parent0dbf2be49db228e43fe4b196199f82ea281886bf (diff)
[bug] tear down of leap.common.events properly in tests
The tests where writting their own implementation of env tear down instead of using leap.common's one. Using it fixes many tests.
-rw-r--r--src/leap/mail/tests/common.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/leap/mail/tests/common.py b/src/leap/mail/tests/common.py
index a411b2d..6ef5d17 100644
--- a/src/leap/mail/tests/common.py
+++ b/src/leap/mail/tests/common.py
@@ -92,12 +92,8 @@ class SoledadTestMixin(unittest.TestCase, BaseLeapTest):
self.results = []
try:
self._soledad.close()
- except Exception as exc:
+ except Exception:
print "ERROR WHILE CLOSING SOLEDAD"
# logging.exception(exc)
finally:
- os.environ["PATH"] = self.old_path
- os.environ["HOME"] = self.old_home
- # safety check
- assert 'leap_tests-' in self.tempdir
- shutil.rmtree(self.tempdir)
+ self.tearDownEnv()