Skip to content

Commit 47529d4

Browse files
authored
Merge pull request #59 from GitRon/refactor/removed-mock-try-excepts-for-python33
Removed Python <3.3 mock imports from unit-test files
2 parents 6d3bd27 + e574cc7 commit 47529d4

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

tests/services/test_validator.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import re
22

3-
try:
4-
from unittest import mock
5-
except ImportError:
6-
import mock
3+
from unittest import mock
74

85
from django.test import override_settings, TestCase
96

tests/test_scrub_data.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
try:
2-
from unittest.mock import patch
3-
except ImportError:
4-
from mock import patch
1+
from unittest.mock import patch
52
from io import StringIO
63

74
from django.core.management import call_command

tests/test_scrub_validator.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from django_scrubber.services.validator import ScrubberValidatorService
22

3-
try:
4-
from unittest import mock
5-
except ImportError:
6-
import mock
3+
from unittest import mock
74

85
from django.core.management import call_command
96
from django.test import TestCase

0 commit comments

Comments
 (0)