mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:45:41 -04:00
add test
This commit is contained in:
@@ -8,6 +8,7 @@ from app.commands import (
|
|||||||
bulk_invite_user_to_service,
|
bulk_invite_user_to_service,
|
||||||
create_new_service,
|
create_new_service,
|
||||||
create_test_user,
|
create_test_user,
|
||||||
|
download_csv_file_by_name,
|
||||||
fix_billable_units,
|
fix_billable_units,
|
||||||
insert_inbound_numbers_from_file,
|
insert_inbound_numbers_from_file,
|
||||||
populate_annual_billing_with_defaults,
|
populate_annual_billing_with_defaults,
|
||||||
@@ -427,6 +428,22 @@ def test_promote_user_to_platform_admin(
|
|||||||
assert user.platform_admin is True
|
assert user.platform_admin is True
|
||||||
|
|
||||||
|
|
||||||
|
def test_download_csv_file_by_name(
|
||||||
|
notify_api, sample_platform_admin
|
||||||
|
):
|
||||||
|
assert sample_platform_admin.platform_admin is True
|
||||||
|
|
||||||
|
result = notify_api.test_cli_runner().invoke(
|
||||||
|
download_csv_file_by_name,
|
||||||
|
[
|
||||||
|
"NonExistentName",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
print(result)
|
||||||
|
assert result == '404'
|
||||||
|
|
||||||
|
|
||||||
def test_promote_user_to_platform_admin_no_result_found(
|
def test_promote_user_to_platform_admin_no_result_found(
|
||||||
notify_db_session, notify_api, sample_user
|
notify_db_session, notify_api, sample_user
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user