summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_network_environment.py
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-09-06 14:33:18 -0400
committerTim Rozet <trozet@redhat.com>2017-09-06 19:02:27 +0000
commitf443d4ea68736bfb7849f83ed054fcbd51971765 (patch)
treeec73ab09401bbcb18ed0681835d8a10f9f3dadea /apex/tests/test_apex_network_environment.py
parent27018324387d4ef0efa908b315403a636f92de55 (diff)
Adds parser tests and cleanup
Adds unit testing for the common/parsers library and cleans up some of the test files syntax. Change-Id: I7ff9d7ba20b028fba410af900a0c3107a5806d8f Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/tests/test_apex_network_environment.py')
-rw-r--r--apex/tests/test_apex_network_environment.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/apex/tests/test_apex_network_environment.py b/apex/tests/test_apex_network_environment.py
index 5047adbb..4e3ae111 100644
--- a/apex/tests/test_apex_network_environment.py
+++ b/apex/tests/test_apex_network_environment.py
@@ -11,10 +11,11 @@ import os
from copy import copy
-from nose.tools import assert_equal
-from nose.tools import assert_is_instance
-from nose.tools import assert_not_equal
-from nose.tools import assert_raises
+from nose.tools import (
+ assert_equal,
+ assert_is_instance,
+ assert_not_equal,
+ assert_raises)
from apex.common.constants import (
EXTERNAL_NETWORK,
@@ -29,23 +30,23 @@ from apex.tests.constants import TEST_CONFIG_DIR
from apex.tests.constants import TEST_BUILD_DIR
-class TestNetworkEnvironment(object):
+class TestNetworkEnvironment:
@classmethod
- def setup_class(klass):
+ def setup_class(cls):
"""This method is run once for each class before any tests are run"""
- klass.ns = NetworkSettings(
+ cls.ns = NetworkSettings(
os.path.join(TEST_CONFIG_DIR, 'network/network_settings.yaml'))
- klass.ns_vlans = NetworkSettings(
+ cls.ns_vlans = NetworkSettings(
os.path.join(TEST_CONFIG_DIR,
'network/network_settings_vlans.yaml'))
- klass.ns_ipv6 = NetworkSettings(
+ cls.ns_ipv6 = NetworkSettings(
os.path.join(TEST_CONFIG_DIR, 'network/network_settings_v6.yaml'))
@classmethod
def teardown_class(klass):
"""This method is run once for each class _after_ all tests are run"""
- def setUp(self):
+ def setup(self):
"""This method is run once before _each_ test method is executed"""
def teardown(self):