Drop legacy tests and deprecations

This commit is contained in:
medmunds
2015-11-29 14:45:08 -08:00
parent 942a6df8c3
commit 4089a35500
4 changed files with 0 additions and 38 deletions

View File

@@ -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)

View File

@@ -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 *

View File

@@ -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)

View File

@@ -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()