'Test that a \'data\' wrapper doesn\'t get added if one is already present.'

def test_json_body_default_data(self):

    model = JsonModel(data_wrapper=True)
    headers = {}
    path_params = {}
    query_params = {}
    body = {'data': 'foo'}
    (headers, unused_params, query, body) = model.request(headers, path_params, query_params, body)
    self.assertEqual(headers['accept'], 'application/json')
    self.assertEqual(headers['content-type'], 'application/json')
    self.assertNotEqual(query, '')
    self.assertEqual(body, '{"data":    "foo"}')
