summaryrefslogtreecommitdiffstats
path: root/tests/test_apex_common_utils.py
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-08-31 01:40:12 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-31 01:40:13 +0000
commitf01595f801e1d78f84b43c111f2955f67573e263 (patch)
tree37d553b3b2ced09a87923fd9e1328d7608aec048 /tests/test_apex_common_utils.py
parent04a7bf2596ea69def02e8aaedd32f091b35ba7ce (diff)
parent4b84887ed2322db6b04924bdee7b44d3dcf7c32d (diff)
Merge "Adds ability to power off nodes in clean"
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)