Ejemplo n.º 1
0
def test_single_result_response(user_client):
    entry_name = create_task_results(1, user_client)
    result, = get_result_list(user_client, entry_name)
    task_id = 1
    expected_url = reverse_result_detail(entry_name, task_id)
    assert result['url'] == expected_url
    assert result['task_id'] == task_id
Ejemplo n.º 2
0
def test_multiple_result_response(user_client, test_scheduler):
    entry_name = create_task_results(3, user_client)
    results = get_result_list(user_client, entry_name)
    assert len(results) == 3

    for i, acq in enumerate(results, start=1):
        expected_url = reverse_result_detail(entry_name, i)
        assert acq['url'] == expected_url
        assert acq['task_id'] == i
Ejemplo n.º 3
0
def test_non_existent_entry(user_client):
    with pytest.raises(AssertionError):
        get_result_list(user_client, 'doesntexist')