def test_delete_cgroup(self):
cgroups = self.cinder_consistencygroups.list()
cgroup = self.cinder_consistencygroups.first()
cinder.volume_cgroup_list_with_vol_type_names(IsA(http.HttpRequest)).\
AndReturn(cgroups)
cinder.volume_cgroup_delete(IsA(http.HttpRequest), cgroup.id,
force=False)
if django.VERSION < (1, 9):
cinder.volume_cgroup_list_with_vol_type_names(
IsA(http.HttpRequest)).AndReturn(cgroups)
self.mox.ReplayAll()
formData = {'action': 'volume_cgroups__deletecg__%s' % cgroup.id}
res = self.client.post(VOLUME_CGROUPS_TAB_URL, formData, follow=True)
self.assertIn("Scheduled deletion of Consistency Group: cg_1",
[m.message for m in res.context['messages']])
评论列表
文章目录