class TestBackup(unittest.TestCase): def setUp(self): self.manager = BackupManager() self._backends = self.manager.get_backends() def test_get_backend(self): self.assertTrue(len(self._backends) > 0) def test_backend_backup_restore(self): for backend in self._backends: # verify the backend have the methods needed self.assertIsInstance(backend.get_name(), str) self.assertIsInstance(backend.get_backup(), Backend) self.assertIsInstance(backend.get_restore(), Backend) def test_need_stop_activities(self): self.assertFalse(self.manager.need_stop_activities())
def setUp(self): self.manager = BackupManager() self._backends = self.manager.get_backends()