瀏覽代碼

Stopped registering the sessions tests models to the sessions app.

Simon Charette 9 年之前
父節點
當前提交
19318507d9
共有 2 個文件被更改,包括 2 次插入5 次删除
  1. 0 3
      tests/sessions_tests/models.py
  2. 2 2
      tests/sessions_tests/tests.py

+ 0 - 3
tests/sessions_tests/custom_db_backend.py → tests/sessions_tests/models.py

@@ -14,9 +14,6 @@ class CustomSession(AbstractBaseSession):
     """
     account_id = models.IntegerField(null=True, db_index=True)
 
-    class Meta:
-        app_label = 'sessions'
-
     @classmethod
     def get_session_store_class(cls):
         return SessionStore

+ 2 - 2
tests/sessions_tests/tests.py

@@ -34,7 +34,7 @@ from django.utils import six, timezone
 from django.utils.encoding import force_text
 from django.utils.six.moves import http_cookies
 
-from .custom_db_backend import SessionStore as CustomDatabaseSession
+from .models import SessionStore as CustomDatabaseSession
 
 
 class SessionTestsMixin(object):
@@ -433,7 +433,7 @@ class DatabaseSessionWithTimeZoneTests(DatabaseSessionTests):
 
 class CustomDatabaseSessionTests(DatabaseSessionTests):
     backend = CustomDatabaseSession
-    session_engine = 'sessions_tests.custom_db_backend'
+    session_engine = 'sessions_tests.models'
 
     def test_extra_session_field(self):
         # Set the account ID to be picked up by a custom session storage