Exemplo n.º 1
0
    def setUp(self):
        super(TestBackupCreate, self).setUp()

        self.volumes_mock.get.return_value = self.volume
        self.backups_mock.create.return_value = self.new_backup

        # Get the command object to test
        self.cmd = backup.CreateBackup(self.app, None)
Exemplo n.º 2
0
    def setUp(self):
        super(TestBackupCreate, self).setUp()

        self.volumes_mock.get.return_value = fakes.FakeResource(
            None, copy.deepcopy(volume_fakes.VOLUME), loaded=True)

        self.backups_mock.create.return_value = fakes.FakeResource(
            None, copy.deepcopy(volume_fakes.BACKUP), loaded=True)
        # Get the command object to test
        self.cmd = backup.CreateBackup(self.app, None)