diff options
author | Tim Rozet <trozet@redhat.com> | 2016-08-30 13:06:33 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-08-30 21:47:55 +0000 |
commit | ae26e2717c408225534033726614a25e16fe18ca (patch) | |
tree | c71cc3f99a03d42a8ec794337c15d10a3a3afbe8 /tests/test_apex_common_utils.py | |
parent | 2eaa43854eb4abfcae8566c37cfb63f187f6696f (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.py | 17 |
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) |