Browse Source

Merge "Revert "Make mock import python 2.7 compatible""

changes/51/752651/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
0ae6673343
3 changed files with 3 additions and 10 deletions
  1. +0
    -0
      validations_common/library/__init__.py
  2. +2
    -6
      validations_common/tests/library/test_check_package_update.py
  3. +1
    -4
      validations_common/tests/library/test_reportentry.py

+ 0
- 0
validations_common/library/__init__.py View File


+ 2
- 6
validations_common/tests/library/test_check_package_update.py View File

@@ -12,12 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.

try:
from unittest.mock import MagicMock
from unittest.mock import patch
except ImportError:
from mock import MagicMock
from mock import patch
from unittest.mock import MagicMock
from unittest.mock import patch

from validations_common.library.check_package_update import check_update
from validations_common.library.check_package_update import get_package_details


+ 1
- 4
validations_common/tests/library/test_reportentry.py View File

@@ -23,10 +23,7 @@ Tests for `reportentry` module.
import validations_common.library.reportentry as validation
from validations_common.tests import base

try:
from unittest import mock
except ImportError:
import mock
from unittest import mock

reason = "Reason #1"
recommendation = ['Recommendation #1']


Loading…
Cancel
Save