'Test the $rename operator.'

def test_update_rename_operator(self):

    coll = self.Person._get_collection()
    doc = self.Person(name='John').save()
    raw_doc = coll.find_one({'_id': doc.pk})
    self.assertEqual(set(raw_doc.keys()), set(['_id', '_cls', 'name']))
    doc.update(rename__name='first_name')
    raw_doc = coll.find_one({'_id': doc.pk})
    self.assertEqual(set(raw_doc.keys()), set(['_id', '_cls', 'first_name']))
    self.assertEqual(raw_doc['first_name'], 'John')
