@pytest.mark.django_db
def test_handles_plain_post_text(client):
    response = client.post(url_string(variables=json.dumps({'who': 'Dolly'})), 'query helloWho($who: String){ test(who: $who) }', 'text/plain')
    assert (response.status_code == 400)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'Must provide query string.'}]}
    assert (response.json() == expected_dict)
@pytest.mark.django_db
def test_handles_plain_post_text(client):
    response = client.post(url_string(variables=json.dumps({'who': 'Dolly'})), 'query helloWho($who: String){ test(who: $who) }', 'text/plain')
    assert (response.status_code == 400)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'errors': [{'message': 'Must provide query string.'}]}
    assert (response.json() == expected_dict)