mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Merge pull request #520 from alphagov/redirect-to-dashboard-when-existing-service
Redirect to dashboard if this isn't the first service
This commit is contained in:
@@ -147,6 +147,18 @@ def mock_get_services(mocker, fake_uuid, user=None):
|
||||
'app.service_api_client.get_services', side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_services_with_no_services(mocker, fake_uuid, user=None):
|
||||
if user is None:
|
||||
user = active_user_with_permissions(fake_uuid)
|
||||
|
||||
def _create(user_id=None):
|
||||
return {'data': []}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_services', side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_services_with_one_service(mocker, fake_uuid, user=None):
|
||||
if user is None:
|
||||
|
||||
Reference in New Issue
Block a user