diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..5fcccaca --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./unit_tests +top_dir=./ diff --git a/unit_tests/__init__.py b/unit_tests/__init__.py index bbd23dfc..cc0b3b71 100644 --- a/unit_tests/__init__.py +++ b/unit_tests/__init__.py @@ -24,5 +24,6 @@ def _add_path(path): if path not in sys.path: sys.path.insert(1, path) + _add_path(_actions) _add_path(_hooks) diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index 278ce805..f9b7b82c 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -150,7 +150,7 @@ def patch_open(): Yields the mock for "open" and "file", respectively.''' mock_open = MagicMock(spec=open) - mock_file = MagicMock(spec=file) + mock_file = MagicMock(spec=__file__) @contextmanager def stub_open(*args, **kwargs):