@pytest.mark.django_db
def test_allows_post_with_get_operation_name(client):
    response = client.post(url_string(operationName='helloWorld'), '\n    query helloYou { test(who: "You"), ...shared }\n    query helloWorld { test(who: "World"), ...shared }\n    query helloDolly { test(who: "Dolly"), ...shared }\n    fragment shared on QueryRoot {\n      shared: test(who: "Everyone")\n    }\n    ', 'application/graphql')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'data': {'test': 'Hello World', 'shared': 'Hello Everyone'}}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_allows_post_with_get_operation_name(client):
    response = client.post(url_string(operationName='helloWorld'), '\n    query helloYou { test(who: "You"), ...shared }\n    query helloWorld { test(who: "World"), ...shared }\n    query helloDolly { test(who: "Dolly"), ...shared }\n    fragment shared on QueryRoot {\n      shared: test(who: "Everyone")\n    }\n    ', 'application/graphql')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'data': {'test': 'Hello World', 'shared': 'Hello Everyone'}}
    assert (response.json() == expected_dict)