mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-06 10:28:26 -04:00
Only 6 fails left to go.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -40,7 +40,7 @@ def format_admin_stats(statistics):
|
|||||||
|
|
||||||
def create_stats_dict():
|
def create_stats_dict():
|
||||||
stats_dict = {}
|
stats_dict = {}
|
||||||
for template in TemplateType:
|
for template in (TemplateType.SMS, TemplateType.EMAIL):
|
||||||
stats_dict[template] = {}
|
stats_dict[template] = {}
|
||||||
|
|
||||||
for status in ("total", "test-key"):
|
for status in ("total", "test-key"):
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from app.enums import (
|
|||||||
KeyType,
|
KeyType,
|
||||||
NotificationType,
|
NotificationType,
|
||||||
OrganizationType,
|
OrganizationType,
|
||||||
|
PermissionType,
|
||||||
ServicePermissionType,
|
ServicePermissionType,
|
||||||
TemplateType,
|
TemplateType,
|
||||||
)
|
)
|
||||||
@@ -922,9 +923,9 @@ def test_update_permissions_will_override_permission_flags(
|
|||||||
result = resp.json
|
result = resp.json
|
||||||
|
|
||||||
assert resp.status_code == 200
|
assert resp.status_code == 200
|
||||||
assert set(result["data"]["permissions"]) == [
|
assert set(result["data"]["permissions"]) == {
|
||||||
ServicePermissionType.INTERNATIONAL_SMS
|
ServicePermissionType.INTERNATIONAL_SMS
|
||||||
]
|
}
|
||||||
|
|
||||||
|
|
||||||
def test_update_service_permissions_will_add_service_permissions(
|
def test_update_service_permissions_will_add_service_permissions(
|
||||||
@@ -1210,9 +1211,8 @@ def test_default_permissions_are_added_for_user_service(
|
|||||||
service_permissions = json_resp["data"]["permissions"][
|
service_permissions = json_resp["data"]["permissions"][
|
||||||
str(sample_service.id)
|
str(sample_service.id)
|
||||||
]
|
]
|
||||||
from app.dao.permissions_dao import default_service_permissions
|
|
||||||
|
|
||||||
assert sorted(ServicePermissionType.defaults()) == sorted(
|
assert sorted(i.value for i in PermissionType.defaults()) == sorted(
|
||||||
service_permissions
|
service_permissions
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ def test_get_service_data_retention(client, sample_service):
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
json_response = json.loads(response.get_data(as_text=True))
|
json_response = json.loads(response.get_data(as_text=True))
|
||||||
assert len(json_response) == 2
|
assert len(json_response) == 2
|
||||||
assert json_response[0] == email_data_retention.serialize()
|
assert json_response[0] == sms_data_retention.serialize()
|
||||||
assert json_response[1] == sms_data_retention.serialize()
|
assert json_response[1] == email_data_retention.serialize()
|
||||||
|
|
||||||
|
|
||||||
def test_get_service_data_retention_returns_empty_list(client, sample_service):
|
def test_get_service_data_retention_returns_empty_list(client, sample_service):
|
||||||
|
|||||||
Reference in New Issue
Block a user