@pytest.mark.django_db
def test_handles_errors_caused_by_a_lack_of_query(client):
    response = client.get(url_string())
    assert (response.status_code == 400)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'Must provide query string.'}]}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_handles_errors_caused_by_a_lack_of_query(client):
    response = client.get(url_string())
    assert (response.status_code == 400)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'Must provide query string.'}]}
    assert (response.json() == expected_dict)