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