Merge "Syntax updates and new tests"
[apex.git] / tests / test_apex_common_utils.py
1 ##############################################################################
2 # Copyright (c) 2016 Dan Radez (Red Hat)
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 from apex.common.utils import str2bool
11
12 from nose.tools import assert_equal
13
14
15 class TestCommonUtils(object):
16     @classmethod
17     def setup_class(klass):
18         """This method is run once for each class before any tests are run"""
19
20     @classmethod
21     def teardown_class(klass):
22         """This method is run once for each class _after_ all tests are run"""
23
24     def setUp(self):
25         """This method is run once before _each_ test method is executed"""
26
27     def teardown(self):
28         """This method is run once after _each_ test method is executed"""
29
30     def test_str2bool(self):
31         assert_equal(str2bool(True), True)
32         assert_equal(str2bool(False), False)
33         assert_equal(str2bool("True"), True)
34         assert_equal(str2bool("YES"), True)