mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 20:01:05 -05:00
Drop legacy tests and deprecations
This commit is contained in:
@@ -41,11 +41,3 @@ class NotSupportedByMandrillError(ValueError):
|
|||||||
avoid duplicating Mandrill's validation logic locally.)
|
avoid duplicating Mandrill's validation logic locally.)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class RemovedInDjrill2(DeprecationWarning):
|
|
||||||
"""Functionality due for deprecation in Djrill 2.0"""
|
|
||||||
|
|
||||||
|
|
||||||
def removed_in_djrill_2(message, stacklevel=1):
|
|
||||||
warnings.warn(message, category=RemovedInDjrill2, stacklevel=stacklevel + 1)
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
from djrill.tests.test_legacy import *
|
|
||||||
from djrill.tests.test_mandrill_send import *
|
from djrill.tests.test_mandrill_send import *
|
||||||
from djrill.tests.test_mandrill_send_template import *
|
from djrill.tests.test_mandrill_send_template import *
|
||||||
from djrill.tests.test_mandrill_webhook import *
|
from djrill.tests.test_mandrill_webhook import *
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
# Tests deprecated Djrill features
|
|
||||||
|
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
from djrill import NotSupportedByMandrillError
|
|
||||||
|
|
||||||
|
|
||||||
class DjrillLegacyExceptionTests(TestCase):
|
|
||||||
def test_NotSupportedByMandrillError(self):
|
|
||||||
"""Unsupported features used to just raise ValueError in 0.2.0"""
|
|
||||||
ex = NotSupportedByMandrillError("testing")
|
|
||||||
self.assertIsInstance(ex, ValueError)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
# Backport from Django 1.8 (django.test.utils)
|
|
||||||
# with fix suggested by https://code.djangoproject.com/ticket/21049
|
|
||||||
def reset_warning_registry():
|
|
||||||
"""
|
|
||||||
Clear warning registry for all modules. This is required in some tests
|
|
||||||
because of a bug in Python that prevents warnings.simplefilter("always")
|
|
||||||
from always making warnings appear: http://bugs.python.org/issue4180
|
|
||||||
|
|
||||||
The bug was fixed in Python 3.4.2.
|
|
||||||
"""
|
|
||||||
key = "__warningregistry__"
|
|
||||||
for mod in list(sys.modules.values()):
|
|
||||||
if hasattr(mod, key):
|
|
||||||
getattr(mod, key).clear()
|
|
||||||
Reference in New Issue
Block a user