def test_post_content(self):
    self.client.ajax_post('auth/token', content_type='application/json', body='{"a":1}')
    assert self.mock_c.request.called
    (method, path, body, headers) = self.mock_c.request.call_args[0]
    assert ('application/json' == headers['Content-Type'])
    assert ('{"a":1}' == body)
def test_post_content(self):
    self.client.ajax_post('auth/token', content_type='application/json', body='{"a":1}')
    assert self.mock_c.request.called
    (method, path, body, headers) = self.mock_c.request.call_args[0]
    assert ('application/json' == headers['Content-Type'])
    assert ('{"a":1}' == body)