Drop support for Django < 1.11

This commit is contained in:
medmunds
2018-05-30 15:20:47 -07:00
parent 23f44dce2d
commit 3a47042269
8 changed files with 10 additions and 383 deletions

View File

@@ -95,10 +95,9 @@ class AnymailTestMixin:
"""Helpful additional methods for Anymail tests"""
def assertLogs(self, logger=None, level=None):
# Note: Django 1.8's django.utils.log.DEFAULT_LOGGING config is set to *not* propagate
# certain logging records. That means you *can't* capture those logs at the root (None) logger.
# (If you really need that, you could override LOGGING in tests.settings.settings_1_8.)
assert logger is not None # `None` root logger won't reliably capture on Django 1.8
# Note: django.utils.log.DEFAULT_LOGGING config is set to *not* propagate certain
# logging records. That means you *can't* capture those logs at the root (None) logger.
assert logger is not None # `None` root logger won't reliably capture
try:
return super(AnymailTestMixin, self).assertLogs(logger, level)
except (AttributeError, TypeError):
@@ -303,7 +302,7 @@ class _AssertWarnsContext(object):
class ClientWithCsrfChecks(Client):
"""Django test Client that enforces CSRF checks
https://docs.djangoproject.com/en/1.9/ref/csrf/#testing
https://docs.djangoproject.com/en/stable/ref/csrf/#testing
"""
def __init__(self, **defaults):