

@test.create_stubs({
    cinder: ('volume_cgroup_get',),
})
def test_detail_view_with_exception(self):
    cgroup = self.cinder_consistencygroups.first()
    cinder.volume_cgroup_get(IsA(http.HttpRequest), cgroup.id).AndRaise(self.exceptions.cinder)
    self.mox.ReplayAll()
    url = reverse('horizon:project:volumes:cgroups:detail', args=[cgroup.id])
    res = self.client.get(url)
    self.assertRedirectsNoFollow(res, VOLUME_INDEX_URL)

dataset/ETHPy150Open openstack/horizon/openstack_dashboard/dashboards/project/volumes/cgroups/tests.py ConsistencyGroupTests.test_detail_view_with_exception/original