diff --git a/tests/backends/test_vanilla_django_backend.py b/tests/backends/test_vanilla_django_backend.py index 4e2bfec..8c09411 100644 --- a/tests/backends/test_vanilla_django_backend.py +++ b/tests/backends/test_vanilla_django_backend.py @@ -5,12 +5,12 @@ from django.test import TestCase, override_settings from django.core.mail import EmailMessage, EmailMultiAlternatives -from django.core.files.storage import storages +from django.core.files.storage import default_storage from django.template import TemplateDoesNotExist from django.core import mail import pytest -from mock import patch, Mock +from unittest.mock import patch, Mock from anymail.message import AnymailMessage from templated_email.backends.vanilla_django import TemplateBackend, EmailRenderException @@ -69,7 +69,7 @@ class TemplateBackendTestCase(MockedNetworkTestCaseMixin, template_backend_klass = TemplateBackend def setUp(self): - self.storage_mock = Mock(wraps=storages["default"])() + self.storage_mock = Mock(wraps=default_storage)() self.storage_mock.save = Mock() self.backend = self.template_backend_klass() self.context = {'username': 'vintasoftware', diff --git a/tests/test_get_templated_mail.py b/tests/test_get_templated_mail.py index 0a2f1a7..96ac3d7 100644 --- a/tests/test_get_templated_mail.py +++ b/tests/test_get_templated_mail.py @@ -1,6 +1,6 @@ from django.test import TestCase -from mock import patch +from unittest.mock import patch from templated_email import get_templated_mail diff --git a/tests/test_send_templated_mail.py b/tests/test_send_templated_mail.py index 0c77b7e..c37ae3f 100644 --- a/tests/test_send_templated_mail.py +++ b/tests/test_send_templated_mail.py @@ -1,6 +1,6 @@ from django.test import TestCase -from mock import patch, Mock +from unittest.mock import patch, Mock from templated_email import send_templated_mail diff --git a/tox-requirements.txt b/tox-requirements.txt index 871945f..5f3db7b 100644 --- a/tox-requirements.txt +++ b/tox-requirements.txt @@ -2,7 +2,6 @@ django-anymail django-pytest django-render-block html2text -mock pytest pytest-django pytest-pythonpath