Update requests as defined in releng
[functest.git] / functest / tests / unit / features / test_barometer.py
index 8ca463b..8c2585d 100644 (file)
@@ -16,15 +16,12 @@ import unittest
 import mock
 
 from functest.core import testcase
-sys.modules['baro_tests'] = mock.Mock()  # noqa
-# pylint: disable=wrong-import-position
-from functest.opnfv_tests.features import barometer
+with mock.patch('functest.utils.functest_utils.get_parameter_from_yaml'):
+    from functest.opnfv_tests.features import barometer
 
 
 class BarometerTesting(unittest.TestCase):
 
-    logging.disable(logging.CRITICAL)
-
     _case_name = "barometercollectd"
     _project_name = "barometer"
 
@@ -47,4 +44,5 @@ class BarometerTesting(unittest.TestCase):
 
 
 if __name__ == "__main__":
+    logging.disable(logging.CRITICAL)
     unittest.main(verbosity=2)