瀏覽代碼

Revert "Import fix try"

This reverts commit 407a5f373c197cff52fc2bdd6e1448b333b9dadc.
Denis K 8 年之前
父節點
當前提交
87c17cd350
共有 1 個文件被更改,包括 2 次插入6 次删除
  1. 2 6
      jet/tests/test_dashboard.py

+ 2 - 6
jet/tests/test_dashboard.py

@@ -1,3 +1,4 @@
+from django.contrib.auth.models import User
 from django.test import TestCase, Client
 from jet.dashboard.modules import LinkList, RecentActions
 from jet.dashboard.models import UserDashboardModule
@@ -13,17 +14,12 @@ class DashboardTestCase(TestCase):
         self._login()
         self._init_dashboard()
 
-    @property
-    def User(self):
-        from django.contrib.auth.models import User
-        return User
-
     def _login(self):
         username = 'admin'
         email = 'admin@example.com'
         password = 'admin'
         self.admin = Client()
-        self.admin_user = self.User.objects.create_superuser(username, email, password)
+        self.admin_user = User.objects.create_superuser(username, email, password)
         return self.admin.login(username=username, password=password)
 
     def _init_dashboard(self):