-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
from datetime import datetime, timedelta | ||
from superdesk.utc import utcnow | ||
from flask import url_for | ||
# from tests.test_users import test_login_succeeds_for_admin, init as users_init | ||
|
||
PUBLIC_USER_ID = ObjectId('59b4c5c61d41c8d736852fbf') | ||
TEST_USER_ID = ObjectId('5cc94454bc43165c045ffec9') | ||
|
@@ -218,6 +217,8 @@ def setup_user_company(app): | |
@fixture(autouse=True) | ||
def init_company(app): | ||
setup_user_company(app) | ||
|
||
|
||
def test_login_succeeds_for_admin(client): | ||
response = client.post( | ||
url_for('auth.login'), | ||
|
@@ -226,17 +227,18 @@ def test_login_succeeds_for_admin(client): | |
) | ||
assert response.status_code == 200 | ||
|
||
|
||
def users_init(app): | ||
|
||
app.data.insert('users', [{ | ||
'_id': ObjectId(ADMIN_USER_ID), | ||
'first_name': 'admin', | ||
'last_name': 'admin', | ||
'email': '[email protected]', | ||
'password': '$2b$12$HGyWCf9VNfnVAwc2wQxQW.Op3Ejk7KIGE6urUXugpI0KQuuK6RWIG', | ||
'user_type': 'administrator', | ||
'is_validated': True, | ||
'is_enabled': True, | ||
'is_approved': True, | ||
'receive_email': True, | ||
}]) | ||
app.data.insert('users', [{ | ||
'_id': ObjectId(ADMIN_USER_ID), | ||
'first_name': 'admin', | ||
'last_name': 'admin', | ||
'email': '[email protected]', | ||
'password': '$2b$12$HGyWCf9VNfnVAwc2wQxQW.Op3Ejk7KIGE6urUXugpI0KQuuK6RWIG', | ||
'user_type': 'administrator', | ||
'is_validated': True, | ||
'is_enabled': True, | ||
'is_approved': True, | ||
'receive_email': True, | ||
}]) |