@pytest.mark.django_db
def test_batch_allows_post_with_operation_name(client):
    response = client.post(batch_url_string(), jl(id=1, query='\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        ', operationName='helloWorld'), 'application/json')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = [{'id': 1, 'data': {'test': 'Hello World', 'shared': 'Hello Everyone'}, 'status': 200}]
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_batch_allows_post_with_operation_name(client):
    response = client.post(batch_url_string(), jl(id=1, query='\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        ', operationName='helloWorld'), 'application/json')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = [{'id': 1, 'data': {'test': 'Hello World', 'shared': 'Hello Everyone'}, 'status': 200}]
    assert (response.json() == expected_dict)