def test_change_id_failure(self):
        class Post(mapping.Document):
            title = mapping.TextField()
        post = Post(title='Foo bar')
        post.store(self.db)
        post = Post.load(self.db, post.id)
        try:
            post.id = 'foo_bar'
            self.fail('Excepted AttributeError')
        except __HOLE__ as e:
            self.assertEqual('id can only be set on new documents', e.args[0])
dataset/ETHPy150Open djc/couchdb-python/couchdb/tests/mapping.py/DocumentTestCase.test_change_id_failure