entry_test.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:contentful-management.py 作者: contentful 项目源码 文件源码
def test_update_entry_field_that_was_undefined_in_the_webapp(self):
        entry = None
        with vcr.use_cassette('fixtures/entry/undefined_fields.yaml'):
            entry = CLIENT.entries(PLAYGROUND_SPACE).find('33uj74Wln2Oc02CAyEY8CK')

            self.assertEqual(entry.fields(), {})

            with vcr.use_cassette('fixtures/entry/undefined_fields_write.yaml'):
                entry.name = 'foo'

                self.assertEqual(entry.fields()['name'], 'foo')

                entry.save()

                updated_entry = CLIENT.entries(PLAYGROUND_SPACE).find('33uj74Wln2Oc02CAyEY8CK')

                self.assertEqual(updated_entry.fields(), {'name': 'foo'})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号