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:
Andrew White
2016-04-28 17:23:14 +01:00
3 changed files with 49 additions and 7 deletions

View File

@@ -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: