aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/base.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2014-06-09 10:42:19 -0400
committerDan Prince <dprince@redhat.com>2014-06-09 10:42:19 -0400
commit846e00d0072533e817c3d2248834e3b3ac5cae98 (patch)
treeb057b0161c2f1c1b8faa06acf7eeba92906a568c /os_net_config/tests/base.py
parent8d3dc898425810a3399a6c2718c35c536137b22e (diff)
Add interface, address, and route objects
Add some initial objects for interfaces, routes and addresses.
Diffstat (limited to 'os_net_config/tests/base.py')
-rw-r--r--os_net_config/tests/base.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/os_net_config/tests/base.py b/os_net_config/tests/base.py
index 3bf12a8..c8ad7c4 100644
--- a/os_net_config/tests/base.py
+++ b/os_net_config/tests/base.py
@@ -18,6 +18,7 @@
import os
import fixtures
+import stubout
import testtools
_TRUE_VALUES = ('True', 'true', '1', 'yes')
@@ -31,6 +32,7 @@ class TestCase(testtools.TestCase):
"""Run before each test method to initialize test environment."""
super(TestCase, self).setUp()
+ self.stubs = stubout.StubOutForTesting()
test_timeout = os.environ.get('OS_TEST_TIMEOUT', 0)
try:
test_timeout = int(test_timeout)
@@ -50,4 +52,9 @@ class TestCase(testtools.TestCase):
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
- self.log_fixture = self.useFixture(fixtures.FakeLogger()) \ No newline at end of file
+ self.log_fixture = self.useFixture(fixtures.FakeLogger())
+
+ def tearDown(self):
+ self.stubs.UnsetAll()
+ self.stubs.SmartUnsetAll()
+ super(TestCase, self).tearDown()