@pytest.mark.django_db
def test_ssorequestaccessview_with_team_leaders(admin_client, team_leaders_group, team_leaders):
    url = reverse('sso:request_access')
    expected_choices = [BLANK_CHOICE]
    expected_choices.extend(list(((tl.id, '{} <{}>'.format(tl.get_full_name(), tl.email)) for tl in team_leaders)))
    response = admin_client.get(url)
    team_leader_field = response.context['form']['team_leader'].field
    actual_choices = list(team_leader_field.choices)
    assert (actual_choices == expected_choices)
@pytest.mark.django_db
def test_ssorequestaccessview_with_team_leaders(admin_client, team_leaders_group, team_leaders):
    url = reverse('sso:request_access')
    expected_choices = [BLANK_CHOICE]
    expected_choices.extend(list(((tl.id, '{} <{}>'.format(tl.get_full_name(), tl.email)) for tl in team_leaders)))
    response = admin_client.get(url)
    team_leader_field = response.context['form']['team_leader'].field
    actual_choices = list(team_leader_field.choices)
    assert (actual_choices == expected_choices)