From 4988e5e9a60cd3814c68c512e3bb284766dda576 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Mon, 15 Nov 2021 14:10:28 +0100 Subject: [PATCH] Fix some bugs in tests --- tests/test_basics.py | 2 +- tests/test_client.py | 2 +- tests/test_user_model.py | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/test_basics.py b/tests/test_basics.py index df9d0ff5..75601f42 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -1,6 +1,6 @@ from app import create_app, db from flask import current_app -from . import TestConfig +from tests import TestConfig import unittest diff --git a/tests/test_client.py b/tests/test_client.py index 89aaa74a..ccf05661 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,5 +1,5 @@ from app import create_app, db -from . import TestConfig +from tests import TestConfig import unittest diff --git a/tests/test_user_model.py b/tests/test_user_model.py index 30066087..b2b179b1 100644 --- a/tests/test_user_model.py +++ b/tests/test_user_model.py @@ -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))