diff --git a/auditlog/__init__.py b/auditlog/__init__.py index e96d652d..50e82385 100644 --- a/auditlog/__init__.py +++ b/auditlog/__init__.py @@ -5,5 +5,3 @@ except DistributionNotFound: # package is not installed pass - -default_app_config = "auditlog.apps.AuditlogConfig" diff --git a/auditlog_tests/__init__.py b/auditlog_tests/__init__.py index fa615123..e69de29b 100644 --- a/auditlog_tests/__init__.py +++ b/auditlog_tests/__init__.py @@ -1 +0,0 @@ -default_app_config = "auditlog_tests.apps.AuditlogTestConfig" diff --git a/auditlog_tests/tests.py b/auditlog_tests/tests.py index d75afbe7..41d71f59 100644 --- a/auditlog_tests/tests.py +++ b/auditlog_tests/tests.py @@ -1,5 +1,6 @@ import datetime import json +from unittest import mock import django from dateutil.tz import gettz @@ -182,7 +183,8 @@ class MiddlewareTest(TestCase): """ def setUp(self): - self.middleware = AuditlogMiddleware() + self.get_response_mock = mock.Mock() + self.middleware = AuditlogMiddleware(get_response=self.get_response_mock) self.factory = RequestFactory() self.user = User.objects.create_user( username="test", email="test@example.com", password="top_secret"