def test_post_json_request(self):
    client = RequestsClient()
    response = client.post('http://testserver/', json={'key': 'value'})
    assert (response.status_code == 200)
    assert (response.headers['Content-Type'] == 'application/json')
    expected = {'method': 'POST', 'query_params': {}, 'POST': {}, 'FILES': {}, 'JSON': {'key': 'value'}}
    assert (response.json() == expected)
def test_post_json_request(self):
    client = RequestsClient()
    response = client.post('http://testserver/', json={'key': 'value'})
    assert (response.status_code == 200)
    assert (response.headers['Content-Type'] == 'application/json')
    expected = {'method': 'POST', 'query_params': {}, 'POST': {}, 'FILES': {}, 'JSON': {'key': 'value'}}
    assert (response.json() == expected)