mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Cleaning things up, trying to get tests to work.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -5,7 +5,8 @@ from app.dao.service_guest_list_dao import (
|
||||
dao_fetch_service_guest_list,
|
||||
dao_remove_service_guest_list,
|
||||
)
|
||||
from app.models import GuestListRecipientType, ServiceGuestList
|
||||
from app.enums import RecipientType
|
||||
from app.models import ServiceGuestList
|
||||
from tests.app.db import create_service
|
||||
|
||||
|
||||
@@ -21,7 +22,7 @@ def test_fetch_service_guest_list_ignores_other_service(sample_service_guest_lis
|
||||
|
||||
def test_add_and_commit_guest_list_contacts_saves_data(sample_service):
|
||||
guest_list = ServiceGuestList.from_string(
|
||||
sample_service.id, GuestListRecipientType.EMAIL, "foo@example.com"
|
||||
sample_service.id, RecipientType.EMAIL, "foo@example.com"
|
||||
)
|
||||
|
||||
dao_add_and_commit_guest_list_contacts([guest_list])
|
||||
@@ -37,10 +38,10 @@ def test_remove_service_guest_list_only_removes_for_my_service(notify_db_session
|
||||
dao_add_and_commit_guest_list_contacts(
|
||||
[
|
||||
ServiceGuestList.from_string(
|
||||
service_1.id, GuestListRecipientType.EMAIL, "service1@example.com"
|
||||
service_1.id, RecipientType.EMAIL, "service1@example.com"
|
||||
),
|
||||
ServiceGuestList.from_string(
|
||||
service_2.id, GuestListRecipientType.EMAIL, "service2@example.com"
|
||||
service_2.id, RecipientType.EMAIL, "service2@example.com"
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -24,8 +24,9 @@ from app.dao.users_dao import (
|
||||
update_user_password,
|
||||
user_can_be_archived,
|
||||
)
|
||||
from app.enums import AuthType
|
||||
from app.errors import InvalidRequest
|
||||
from app.models import EMAIL_AUTH_TYPE, User, VerifyCode
|
||||
from app.models import User, VerifyCode
|
||||
from tests.app.db import (
|
||||
create_permissions,
|
||||
create_service,
|
||||
@@ -229,7 +230,7 @@ def test_dao_archive_user(sample_user, sample_organization, fake_uuid):
|
||||
assert sample_user.get_permissions() == {}
|
||||
assert sample_user.services == []
|
||||
assert sample_user.organizations == []
|
||||
assert sample_user.auth_type == EMAIL_AUTH_TYPE
|
||||
assert sample_user.auth_type == AuthType.EMAIL
|
||||
assert sample_user.email_address == "_archived_2018-07-07_notify@digital.fake.gov"
|
||||
assert sample_user.mobile_number is None
|
||||
assert sample_user.current_session_id == uuid.UUID(
|
||||
|
||||
Reference in New Issue
Block a user