mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-13 00:05:41 +00:00
Fix some bugs in tests
This commit is contained in:
parent
99674e6a7f
commit
4988e5e9a6
@ -1,6 +1,6 @@
|
||||
from app import create_app, db
|
||||
from flask import current_app
|
||||
from . import TestConfig
|
||||
from tests import TestConfig
|
||||
import unittest
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from app import create_app, db
|
||||
from . import TestConfig
|
||||
from tests import TestConfig
|
||||
import unittest
|
||||
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user