diff options
author | Ilya Shakhat <shakhat@gmail.com> | 2017-08-10 14:16:01 +0200 |
---|---|---|
committer | Ilya Shakhat <shakhat@gmail.com> | 2017-08-10 14:21:02 +0200 |
commit | 17f8441e28ebb6a63d7cf9684ace271461b9a779 (patch) | |
tree | cdf4595c9de7ffa5b1856cefa9f4519be8f034fa /osprofiler/tests | |
parent | 88c1e8b9d39f11cde47c67d20cca186ef8a3ed16 (diff) | |
download | osprofiler-17f8441e28ebb6a63d7cf9684ace271461b9a779.tar.gz |
Make test_notifier independent of test case execution order
Test_notifier contains a test case that verifies default notifier value
(test_get_default_notifier) and there are 2 test cases that update
default notifier value. It's supposed that test_get_default_notifier
is executed first, otherwise it gets wrong value. Test's tearDown()
method was designed to restore default notifier, but failed to do so
due to wrong reference to global variable.
Change-Id: Id083f1e8ba4bf2a0341eb1a7ee8891b53c1f3a65
Diffstat (limited to 'osprofiler/tests')
-rw-r--r-- | osprofiler/tests/unit/test_notifier.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/osprofiler/tests/unit/test_notifier.py b/osprofiler/tests/unit/test_notifier.py index 332e620..7cccdad 100644 --- a/osprofiler/tests/unit/test_notifier.py +++ b/osprofiler/tests/unit/test_notifier.py @@ -22,7 +22,7 @@ from osprofiler.tests import test class NotifierTestCase(test.TestCase): def tearDown(self): - notifier.__notifier = notifier._noop_notifier + notifier.set(notifier._noop_notifier) # restore defaults super(NotifierTestCase, self).tearDown() def test_set(self): |