@pytest.mark.django_db
def test_allows_sending_a_mutation_via_post(client):
    response = client.post(url_string(), j(query='mutation TestMutation { writeTest { test } }'), 'application/json')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'data': {'writeTest': {'test': 'Hello World'}}}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_allows_sending_a_mutation_via_post(client):
    response = client.post(url_string(), j(query='mutation TestMutation { writeTest { test } }'), 'application/json')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'data': {'writeTest': {'test': 'Hello World'}}}
    assert (response.json() == expected_dict)