@pytest.mark.django_db
def test_allows_post_with_url_encoding(client):
    response = client.post(url_string(), urlencode(dict(query='{test}')), 'application/x-www-form-urlencoded')
    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_url_encoding(client):
    response = client.post(url_string(), urlencode(dict(query='{test}')), 'application/x-www-form-urlencoded')
    assert (response.status_code == 200)
    assert (response['Content-Type'].split(';')[0] == 'application/json')
    expected_dict = {'data': {'test': 'Hello World'}}
    assert (response.json() == expected_dict)