Skip to content

Commit

Permalink
Use default_storage directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rangelfinal committed Sep 25, 2023
1 parent 511773a commit 41576c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/backends/test_vanilla_django_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_get_templated_mail.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_send_templated_mail.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion tox-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ django-anymail
django-pytest
django-render-block
html2text
mock
pytest
pytest-django
pytest-pythonpath
Expand Down

0 comments on commit 41576c1

Please sign in to comment.