diff options
author | 2014-06-09 10:42:19 -0400 | |
---|---|---|
committer | 2014-06-09 10:42:19 -0400 | |
commit | 846e00d0072533e817c3d2248834e3b3ac5cae98 (patch) | |
tree | b057b0161c2f1c1b8faa06acf7eeba92906a568c /os_net_config/tests | |
parent | 8d3dc898425810a3399a6c2718c35c536137b22e (diff) |
Add interface, address, and route objects
Add some initial objects for interfaces, routes and addresses.
Diffstat (limited to 'os_net_config/tests')
-rw-r--r-- | os_net_config/tests/__init__.py | 2 | ||||
-rw-r--r-- | os_net_config/tests/base.py | 9 | ||||
-rw-r--r-- | os_net_config/tests/test_os_net_config.py | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/os_net_config/tests/__init__.py b/os_net_config/tests/__init__.py index f88664e..19f5e72 100644 --- a/os_net_config/tests/__init__.py +++ b/os_net_config/tests/__init__.py @@ -10,4 +10,4 @@ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations -# under the License.
\ No newline at end of file +# under the License. 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() diff --git a/os_net_config/tests/test_os_net_config.py b/os_net_config/tests/test_os_net_config.py index f9fd95e..384dc2c 100644 --- a/os_net_config/tests/test_os_net_config.py +++ b/os_net_config/tests/test_os_net_config.py @@ -25,4 +25,4 @@ from os_net_config.tests import base class TestOs_net_config(base.TestCase): def test_something(self): - pass
\ No newline at end of file + pass |