summaryrefslogtreecommitdiffstats
path: root/tests/test_apex_common_utils.py
diff options
context:
space:
mode:
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)