@pytest.mark.django_db
def test_handles_unsupported_http_methods(client):
    response = client.put(url_string(query='{test}'))
    assert (response.status_code == 405)
    assert (response['Allow'] == 'GET, POST')
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'GraphQL only supports GET and POST requests.'}]}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_handles_unsupported_http_methods(client):
    response = client.put(url_string(query='{test}'))
    assert (response.status_code == 405)
    assert (response['Allow'] == 'GET, POST')
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'GraphQL only supports GET and POST requests.'}]}
    assert (response.json() == expected_dict)