def test_update_audit_template_remove(self):
description = 'my at description'
name = 'my at name %s' % uuidutils.generate_uuid()
params = {'name': name,
'description': description,
'goal': self.goal['uuid']}
_, audit_template = self.create_audit_template(**params)
# Removing the description
self.client.update_audit_template(
audit_template['uuid'],
[{'path': '/description', 'op': 'remove'}])
_, body = self.client.show_audit_template(audit_template['uuid'])
self.assertIsNone(body.get('description'))
# Assert nothing else was changed
self.assertEqual(name, body['name'])
self.assertIsNone(body['description'])
self.assertEqual(self.goal['uuid'], body['goal_uuid'])
test_audit_template.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录