Ejemplo n.º 1
0
    def setUp(self):
        super(TestBackupRestore, self).setUp()

        self.backups_mock.get.return_value = self.backup
        self.volumes_mock.get.return_value = self.volume
        self.restores_mock.restore.return_value = None
        # Get the command object to mock
        self.cmd = backup.RestoreVolumeBackup(self.app, None)
Ejemplo n.º 2
0
    def setUp(self):
        super(TestBackupRestore, self).setUp()

        self.backups_mock.get.return_value = self.backup
        self.volumes_mock.get.return_value = self.volume
        self.restores_mock.restore.return_value = (
            volume_fakes.FakeVolume.create_one_volume(
                {'id': self.volume['id']}))
        # Get the command object to mock
        self.cmd = backup.RestoreVolumeBackup(self.app, None)