From c1f015a55c0b7690bdb5d7bf9995b4fb304d8a1d 2016-10-25 10:56:01 From: Marcin Lulek Date: 2016-10-25 10:56:01 Subject: [PATCH] tests: small fixes --- diff --git a/backend/src/appenlight/tests/conftest.py b/backend/src/appenlight/tests/conftest.py index 03f68aa..fe44ca4 100644 --- a/backend/src/appenlight/tests/conftest.py +++ b/backend/src/appenlight/tests/conftest.py @@ -111,9 +111,10 @@ def default_user(): from appenlight.models.user import User from appenlight.models.auth_token import AuthToken transaction.begin() - user = User(user_name='testuser', + user = User(id=1, + user_name='testuser', status=1, - email='ergo14@gmail.com') + email='foo@barbaz99.com') DBSession.add(user) token = AuthToken(token='1234') user.auth_tokens.append(token) diff --git a/backend/src/appenlight/tests/test_integration.py b/backend/src/appenlight/tests/test_integration.py index 7ea18b6..09b8333 100644 --- a/backend/src/appenlight/tests/test_integration.py +++ b/backend/src/appenlight/tests/test_integration.py @@ -25,7 +25,7 @@ from webtest import TestApp @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', 'default_application') -class TestIntegrationAPIReportsView(object): +class TestAPIReportsView(object): def test_no_json_payload(self, base_app): app = TestApp(base_app) url_path = '/api/reports' @@ -58,7 +58,7 @@ class TestIntegrationAPIReportsView(object): @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', 'default_data', 'default_application') -class TestIntegrationRegistrationView(object): +class TestRegistrationView(object): def test_register_empty(self, base_app): url_path = '/register' app = TestApp(base_app) @@ -96,7 +96,7 @@ class TestIntegrationRegistrationView(object): @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', 'default_data', 'default_application') -class TestIntegrationRegistrationAuthTokenView(object): +class TestRegistrationAuthTokenView(object): def test_create_application_bad(self, base_app): url_path = '/applications'