@pytest.mark.parametrize('assignment_status, expected_status_code', ((UserProfile.STATUS_CREATED, 200), (UserProfile.STATUS_AWAITING_APPROVAL, 302), (UserProfile.STATUS_APPROVED, 302)))
@pytest.mark.django_db
def test_ssorequestaccessview_responds_based_on_assignment_status(admin_client, admin_user, assignment_status, expected_status_code):
    url = reverse('sso:request_access')
    profile = admin_user.userprofile
    profile.assignment_status = assignment_status
    profile.save()
    response = admin_client.get(url)
    assert (response.status_code == expected_status_code)
@pytest.mark.parametrize('assignment_status, expected_status_code', ((UserProfile.STATUS_CREATED, 200), (UserProfile.STATUS_AWAITING_APPROVAL, 302), (UserProfile.STATUS_APPROVED, 302)))
@pytest.mark.django_db
def test_ssorequestaccessview_responds_based_on_assignment_status(admin_client, admin_user, assignment_status, expected_status_code):
    url = reverse('sso:request_access')
    profile = admin_user.userprofile
    profile.assignment_status = assignment_status
    profile.save()
    response = admin_client.get(url)
    assert (response.status_code == expected_status_code)