Use unittest.mock instead of third party mock

Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ida2ec7793c3863836e1c626eb72e0aa9f48b6810
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-03-24 07:47:14 -05:00
parent 46045d407c
commit 4b08096d23
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
10 changed files with 18 additions and 29 deletions

View File

@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from smtplib import SMTPException
from django.core import mail
from unittest import mock
from confspirator.tests import utils as conf_utils
from django.core import mail
from adjutant.actions.v1.misc import SendAdditionalEmailAction
from adjutant.actions.utils import send_email

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from confspirator.tests import utils as conf_utils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from confspirator.tests import utils as conf_utils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from confspirator.tests import utils as conf_utils

View File

@ -14,17 +14,15 @@
from datetime import timedelta
import json
import mock
from unittest import mock
from unittest import skip
from confspirator.tests import utils as conf_utils
from django.utils import timezone
from django.core import mail
from rest_framework import status
from rest_framework.test import APITestCase
from confspirator.tests import utils as conf_utils
from adjutant.api.models import Task, Token, Notification
from adjutant.common.tests import fake_clients
from adjutant.common.tests.fake_clients import FakeManager, setup_identity_cache

View File

@ -13,13 +13,11 @@
# under the License.
from datetime import timedelta
import mock
from rest_framework import status
from django.utils import timezone
from unittest import mock
from confspirator.tests import utils as conf_utils
from django.utils import timezone
from rest_framework import status
from adjutant.api.models import Token, Task
from adjutant.common.tests import fake_clients

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from django.core import mail
from rest_framework import status
from unittest import mock
from confspirator.tests import utils as conf_utils
from django.core import mail
from rest_framework import status
from adjutant.api.models import Token, Notification
from adjutant.tasks.models import Task

View File

@ -12,10 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from uuid import uuid4
import mock
from adjutant.config import CONF

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from django.core import mail
from rest_framework import status
from unittest import mock
from confspirator.tests import utils as conf_utils
from django.core import mail
from rest_framework import status
from adjutant.api.models import Notification
from adjutant.tasks.models import Task

View File

@ -6,7 +6,6 @@ flake8>=3.7.7 # MIT
coverage>=4.5.3 # Apache-2.0
doc8>=0.8.0 # Apache-2.0
mock>=3.0.0 # BSD
Pygments>=2.2.0 # BSD license
flake8-bugbear>=19.3.0;python_version>='3.4' # MIT
black>=19.3b0;python_version>='3.4' # MIT
black>=19.3b0;python_version>='3.4' # MIT