@pytest.mark.django_db
def test_reports_validation_errors(client):
    response = client.get(url_string(query='{ test, unknownOne, unknownTwo }'))
    assert (response.status_code == 400)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'Cannot query field "unknownOne" on type "QueryRoot".', 'locations': [{'line': 1, 'column': 9}]}, {'message': 'Cannot query field "unknownTwo" on type "QueryRoot".', 'locations': [{'line': 1, 'column': 21}]}]}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_reports_validation_errors(client):
    response = client.get(url_string(query='{ test, unknownOne, unknownTwo }'))
    assert (response.status_code == 400)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'Cannot query field "unknownOne" on type "QueryRoot".', 'locations': [{'line': 1, 'column': 9}]}, {'message': 'Cannot query field "unknownTwo" on type "QueryRoot".', 'locations': [{'line': 1, 'column': 21}]}]}
    assert (response.json() == expected_dict)