@pytest.mark.django_db
def test_handles_syntax_errors_caught_by_graphql(client):
    response = client.get(url_string(query='syntaxerror'))
    assert (response.status_code == 400)
    expected_dict = {'errors': [{'locations': [{'column': 1, 'line': 1}], 'message': 'Syntax Error GraphQL (1:1) Unexpected Name "syntaxerror"\n\n1: syntaxerror\n   ^\n'}]}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_handles_syntax_errors_caught_by_graphql(client):
    response = client.get(url_string(query='syntaxerror'))
    assert (response.status_code == 400)
    expected_dict = {'errors': [{'locations': [{'column': 1, 'line': 1}], 'message': 'Syntax Error GraphQL (1:1) Unexpected Name "syntaxerror"\n\n1: syntaxerror\n   ^\n'}]}
    assert (response.json() == expected_dict)