Show More
@@ -111,9 +111,10 b' def default_user():' | |||||
111 | from appenlight.models.user import User |
|
111 | from appenlight.models.user import User | |
112 | from appenlight.models.auth_token import AuthToken |
|
112 | from appenlight.models.auth_token import AuthToken | |
113 | transaction.begin() |
|
113 | transaction.begin() | |
114 |
user = User( |
|
114 | user = User(id=1, | |
|
115 | user_name='testuser', | |||
115 | status=1, |
|
116 | status=1, | |
116 |
email=' |
|
117 | email='foo@barbaz99.com') | |
117 | DBSession.add(user) |
|
118 | DBSession.add(user) | |
118 | token = AuthToken(token='1234') |
|
119 | token = AuthToken(token='1234') | |
119 | user.auth_tokens.append(token) |
|
120 | user.auth_tokens.append(token) |
@@ -25,7 +25,7 b' from webtest import TestApp' | |||||
25 |
|
25 | |||
26 | @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', |
|
26 | @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', | |
27 | 'default_application') |
|
27 | 'default_application') | |
28 |
class Test |
|
28 | class TestAPIReportsView(object): | |
29 | def test_no_json_payload(self, base_app): |
|
29 | def test_no_json_payload(self, base_app): | |
30 | app = TestApp(base_app) |
|
30 | app = TestApp(base_app) | |
31 | url_path = '/api/reports' |
|
31 | url_path = '/api/reports' | |
@@ -58,7 +58,7 b' class TestIntegrationAPIReportsView(object):' | |||||
58 |
|
58 | |||
59 | @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', |
|
59 | @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', | |
60 | 'default_data', 'default_application') |
|
60 | 'default_data', 'default_application') | |
61 |
class Test |
|
61 | class TestRegistrationView(object): | |
62 | def test_register_empty(self, base_app): |
|
62 | def test_register_empty(self, base_app): | |
63 | url_path = '/register' |
|
63 | url_path = '/register' | |
64 | app = TestApp(base_app) |
|
64 | app = TestApp(base_app) | |
@@ -96,7 +96,7 b' class TestIntegrationRegistrationView(object):' | |||||
96 |
|
96 | |||
97 | @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', |
|
97 | @pytest.mark.usefixtures('base_app', 'with_migrations', 'clean_tables', | |
98 | 'default_data', 'default_application') |
|
98 | 'default_data', 'default_application') | |
99 |
class Test |
|
99 | class TestRegistrationAuthTokenView(object): | |
100 |
|
100 | |||
101 | def test_create_application_bad(self, base_app): |
|
101 | def test_create_application_bad(self, base_app): | |
102 | url_path = '/applications' |
|
102 | url_path = '/applications' |
General Comments 0
You need to be logged in to leave comments.
Login now