summaryrefslogtreecommitdiffstats
path: root/tests/test_apex_common_utils.py
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-08-30 13:06:33 -0400
committerTim Rozet <trozet@redhat.com>2016-08-30 15:34:04 -0400
commit4b84887ed2322db6b04924bdee7b44d3dcf7c32d (patch)
tree7500abe13324ba298ce0b6eff08bd04f87510bd3 /tests/test_apex_common_utils.py
parentd7ceff5d5eefef27f7c2dd23c9161cc8ddd7140b (diff)
Adds ability to power off nodes in clean
Now if an inventory file is provided to clean, those nodes will be powered off. JIRA: APEX-250 Change-Id: I2d78285717726c3d1c9d7d88c38e706d4617e337 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'tests/test_apex_common_utils.py')
-rw-r--r--tests/test_apex_common_utils.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/test_apex_common_utils.py b/tests/test_apex_common_utils.py
index 7c988e3d..94598657 100644
--- a/tests/test_apex_common_utils.py
+++ b/tests/test_apex_common_utils.py
@@ -7,9 +7,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from apex.common.utils import str2bool
+import nose.tools
-from nose.tools import assert_equal
+from apex.common import utils
class TestCommonUtils(object):
@@ -28,7 +28,12 @@ class TestCommonUtils(object):
"""This method is run once after _each_ test method is executed"""
def test_str2bool(self):
- assert_equal(str2bool(True), True)
- assert_equal(str2bool(False), False)
- assert_equal(str2bool("True"), True)
- assert_equal(str2bool("YES"), True)
+ nose.tools.assert_equal(utils.str2bool(True), True)
+ nose.tools.assert_equal(utils.str2bool(False), False)
+ nose.tools.assert_equal(utils.str2bool("True"), True)
+ nose.tools.assert_equal(utils.str2bool("YES"), True)
+
+ def test_parse_yaml(self):
+ nose.tools.assert_is_instance(
+ utils.parse_yaml('../config/network/network_settings.yaml'),
+ dict)