def METHOD_NAME(self):
    self.assertRaises(client.HTTPError, lambda: self.col.insert('NOT VALID DATA'))
    id = self.col.insert(json.dumps({'foo': 'bar'}))['_key']
    self.assertRaises(client.HTTPError, lambda: self.col.update(id, 'NOT VALID DATA'))
    self.assertEqual(self.col.query_by_id(id)['foo'], 'bar')