mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Make sure caseworking users clear their invite
There was a bug where caseworking users skipped the part of the invite flow where their invite was cleared from the session. This caused a 500 if they later tried to create another service. This commit makes sure that both types of user have the invite cleared from the session after accepting it.
This commit is contained in:
@@ -2597,7 +2597,13 @@ def os_environ():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client_request(logged_in_client):
|
||||
def client_request(
|
||||
logged_in_client,
|
||||
active_user_with_permissions,
|
||||
mocker,
|
||||
service_one,
|
||||
fake_uuid,
|
||||
):
|
||||
class ClientRequest:
|
||||
|
||||
@staticmethod
|
||||
@@ -2606,6 +2612,9 @@ def client_request(logged_in_client):
|
||||
with logged_in_client.session_transaction() as session:
|
||||
yield session
|
||||
|
||||
def login(user, service=service_one):
|
||||
logged_in_client.login(user, mocker, service)
|
||||
|
||||
@staticmethod
|
||||
def get(
|
||||
endpoint,
|
||||
|
||||
Reference in New Issue
Block a user