diff kallithea/tests/functional/test_admin.py @ 8687:5e46f73f0d1c

model: always import the whole db module - drop "from" imports
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 12 Oct 2020 11:12:37 +0200
parents b095e2fbba44
children
line wrap: on
line diff
--- a/kallithea/tests/functional/test_admin.py	Mon Oct 12 11:21:15 2020 +0200
+++ b/kallithea/tests/functional/test_admin.py	Mon Oct 12 11:12:37 2020 +0200
@@ -3,8 +3,7 @@
 import os
 from os.path import dirname
 
-from kallithea.model import meta
-from kallithea.model.db import UserLog
+from kallithea.model import db, meta
 from kallithea.tests import base
 
 
@@ -15,7 +14,7 @@
 
     @classmethod
     def setup_class(cls):
-        UserLog.query().delete()
+        db.UserLog.query().delete()
         meta.Session().commit()
 
         def strptime(val):
@@ -32,7 +31,7 @@
 
         with open(os.path.join(FIXTURES, 'journal_dump.csv')) as f:
             for row in csv.DictReader(f):
-                ul = UserLog()
+                ul = db.UserLog()
                 for k, v in row.items():
                     if k == 'action_date':
                         v = strptime(v)
@@ -45,7 +44,7 @@
 
     @classmethod
     def teardown_class(cls):
-        UserLog.query().delete()
+        db.UserLog.query().delete()
         meta.Session().commit()
 
     def test_index(self):