mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
update tests to use create_user instead of sample_user
note that all of these tests have to be checked to ensure that they still call through to notify_db_session (notify_db not required) to tear down the database after the test runs - since it's no longer required to pass it in to the function just to invoke the sample_user function
This commit is contained in:
@@ -7,7 +7,7 @@ from app.dao.api_key_dao import expire_api_key
|
||||
from tests import create_authorization_header
|
||||
from tests.app.conftest import sample_api_key as create_sample_api_key
|
||||
from tests.app.conftest import sample_service as create_sample_service
|
||||
from tests.app.conftest import sample_user as create_user
|
||||
from tests.app.db import create_user
|
||||
|
||||
|
||||
def test_api_key_should_create_new_api_key_for_service(notify_api, sample_service):
|
||||
@@ -101,7 +101,7 @@ def test_get_api_keys_should_return_all_keys_for_service(notify_api, notify_db,
|
||||
sample_api_key):
|
||||
with notify_api.test_request_context():
|
||||
with notify_api.test_client() as client:
|
||||
another_user = create_user(notify_db, notify_db_session, email='another@it.gov.uk')
|
||||
another_user = create_user(email='another@it.gov.uk')
|
||||
|
||||
another_service = create_sample_service(
|
||||
notify_db,
|
||||
|
||||
Reference in New Issue
Block a user