Fix some bugs in tests

This commit is contained in:
Patrick Jentsch 2021-11-15 14:10:28 +01:00
parent 99674e6a7f
commit 4988e5e9a6
3 changed files with 4 additions and 9 deletions

View File

@ -1,6 +1,6 @@
from app import create_app, db
from flask import current_app
from . import TestConfig
from tests import TestConfig
import unittest

View File

@ -1,5 +1,5 @@
from app import create_app, db
from . import TestConfig
from tests import TestConfig
import unittest

View File

@ -1,6 +1,6 @@
from app import create_app, db
from app.models import User, AnonymousUser, Role, Permission
from . import TestConfig
from app.models import User, Role, Permission
from tests import TestConfig
import time
import unittest
@ -65,8 +65,3 @@ class UserModelTestCase(unittest.TestCase):
u = User(email='john@example.com', password='cat')
self.assertTrue(u.can(Permission.CREATE_JOB))
self.assertFalse(u.can(Permission.ADMIN))
def test_anonymous_user(self):
u = AnonymousUser()
self.assertFalse(u.can(Permission.CREATE_JOB))
self.assertFalse(u.can(Permission.ADMIN))