Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rbi-aap committed Sep 2, 2024
1 parent b847be9 commit 565b8de
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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'),
Expand All @@ -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,
}])

0 comments on commit 565b8de

Please sign in to comment.