Merge "Use unittest.mock instead of third party mock"

This commit is contained in:
Zuul 2020-04-29 07:28:55 +00:00 committed by Gerrit Code Review
commit a4726f5a77
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