Exemplo 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.RestoreBackup(self.app, None)
Exemplo n.º 2
0
    def setUp(self):
        super(TestBackupRestore, self).setUp()

        self.backups_mock.get.return_value = fakes.FakeResource(
            None, copy.deepcopy(volume_fakes.BACKUP), loaded=True)
        self.volumes_mock.get.return_value = fakes.FakeResource(
            None, copy.deepcopy(volume_fakes.VOLUME), loaded=True)
        self.restores_mock.restore.return_value = None
        # Get the command object to mock
        self.cmd = backup.RestoreBackup(self.app, None)