@test.create_stubs({api.cinder: ('volume_snapshot_list_paged',
                                     'volume_list',
                                     'volume_backup_supported',
                                     'volume_snapshot_delete',
                                     'tenant_absolute_limits')})
    def test_delete_volume_snapshot(self):
        vol_snapshots = self.cinder_volume_snapshots.list()
        volumes = self.cinder_volumes.list()
        snapshot = self.cinder_volume_snapshots.first()

        api.cinder.volume_backup_supported(IsA(http.HttpRequest)). \
            MultipleTimes().AndReturn(True)
        api.cinder.volume_snapshot_list_paged(
            IsA(http.HttpRequest), paginate=True, marker=None,
            sort_dir='desc').AndReturn([vol_snapshots, False, False])
        api.cinder.volume_list(IsA(http.HttpRequest)). \
            AndReturn(volumes)

        api.cinder.volume_snapshot_delete(IsA(http.HttpRequest), snapshot.id)
        self.mox.ReplayAll()

        formData = {'action':
                    snapshot.id % 'volume_snapshots__delete__%s'}
        res = self.client.post(VOLUME_SNAPSHOTS_TAB_URL, formData)

        self.assertRedirectsNoFollow(res, VOLUME_SNAPSHOTS_TAB_URL)
        self.assertMessageCount(success=1)
dataset/ETHPy150Open openstack/horizon/openstack_dashboard/dashboards/project/volumes/snapshots/tests.py/VolumeSnapshotsViewTests.test_delete_volume_snapshot/swapped operands of `%`