def test_package_update(self):
idf.plugin.create_country_codes()
helpers.call_action(
'package_create', name='test_package',
custom_text='this is my custom text', country_code='uk',
resources=[{
'url': 'http://test.com/',
'custom_resource_text': 'my custom resource',
}])
result = helpers.call_action(
'package_update',
name='test_package',
custom_text='this is my updated text',
country_code='ie',
resources=[{
'url': 'http://test.com/',
'custom_resource_text': 'updated custom resource',
}]
)
nt.assert_equals('this is my updated text', result['custom_text'])
nt.assert_equals([u'ie'], result['country_code'])
nt.assert_equals('updated custom resource',
result['resources'][0]['custom_resource_text'])
test_example_idatasetform.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录