diff --git a/validations_common/library/__init__.py b/validations_common/library/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/validations_common/tests/library/test_check_package_update.py b/validations_common/tests/library/test_check_package_update.py index 173d0fb..b5f8f69 100644 --- a/validations_common/tests/library/test_check_package_update.py +++ b/validations_common/tests/library/test_check_package_update.py @@ -12,8 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from unittest.mock import MagicMock -from unittest.mock import patch +try: + from unittest.mock import MagicMock + from unittest.mock import patch +except ImportError: + from mock import MagicMock + from mock import patch from validations_common.library.check_package_update import check_update from validations_common.library.check_package_update import get_package_details diff --git a/validations_common/tests/library/test_reportentry.py b/validations_common/tests/library/test_reportentry.py index 92075a5..d97ca34 100644 --- a/validations_common/tests/library/test_reportentry.py +++ b/validations_common/tests/library/test_reportentry.py @@ -23,7 +23,10 @@ Tests for `reportentry` module. import validations_common.library.reportentry as validation from validations_common.tests import base -from unittest import mock +try: + from unittest import mock +except ImportError: + import mock reason = "Reason #1" recommendation = ['Recommendation #1']