entry_test.py 文件源码

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

项目:contentful-management.py 作者: contentful 项目源码 文件源码
def test_update_entry_field_with_undefined_but_non_present_field(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_non_present.yaml'):
                entry.non_existent = 'foo'

                self.assertEqual(entry.non_existent, 'foo')
                self.assertEqual(entry.fields(), {})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号