diff --git a/simple_history/tests/tests/test_admin.py b/simple_history/tests/tests/test_admin.py index a29015e4f..070673ba6 100644 --- a/simple_history/tests/tests/test_admin.py +++ b/simple_history/tests/tests/test_admin.py @@ -10,6 +10,7 @@ from django.contrib.auth.models import User from django.contrib.admin.util import quote from django.conf import settings +from simple_history.models import HistoricalRecords from ..models import Book, Person, Poll, State @@ -40,6 +41,12 @@ def setUp(self): self.user = User.objects.create_superuser('user_login', 'u@example.com', 'pass') + def tearDown(self): + try: + del HistoricalRecords.thread.request + except AttributeError: + pass + def login(self, user=None): if user is None: user = self.user