From 4089a355007618a52bd364ab7fc890846bfba277 Mon Sep 17 00:00:00 2001 From: medmunds Date: Sun, 29 Nov 2015 14:45:08 -0800 Subject: [PATCH] Drop legacy tests and deprecations --- djrill/exceptions.py | 8 -------- djrill/tests/__init__.py | 1 - djrill/tests/test_legacy.py | 12 ------------ djrill/tests/utils.py | 17 ----------------- 4 files changed, 38 deletions(-) delete mode 100644 djrill/tests/test_legacy.py delete mode 100644 djrill/tests/utils.py diff --git a/djrill/exceptions.py b/djrill/exceptions.py index c7913b8..edf818b 100644 --- a/djrill/exceptions.py +++ b/djrill/exceptions.py @@ -41,11 +41,3 @@ class NotSupportedByMandrillError(ValueError): 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) diff --git a/djrill/tests/__init__.py b/djrill/tests/__init__.py index c1b7504..1d0efac 100644 --- a/djrill/tests/__init__.py +++ b/djrill/tests/__init__.py @@ -1,4 +1,3 @@ -from djrill.tests.test_legacy import * from djrill.tests.test_mandrill_send import * from djrill.tests.test_mandrill_send_template import * from djrill.tests.test_mandrill_webhook import * diff --git a/djrill/tests/test_legacy.py b/djrill/tests/test_legacy.py deleted file mode 100644 index 3e632fd..0000000 --- a/djrill/tests/test_legacy.py +++ /dev/null @@ -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) diff --git a/djrill/tests/utils.py b/djrill/tests/utils.py deleted file mode 100644 index add2a83..0000000 --- a/djrill/tests/utils.py +++ /dev/null @@ -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()