def test_cet_current_snapshot_returns_none_when_no_snapshot_exists(self): # Arrange vm = Mock() vm.snapshot = None # Act current_snapshot_name = SnapshotRetriever.get_current_snapshot_name(vm) # assert self.assertIsNone(current_snapshot_name)
def test_cet_current_snapshot_returns_none_when_no_snapshot_exists(self): # Arrange vm = Mock() vm.snapshot = None # Act current_snapshot_name = SnapshotRetriever.get_current_snapshot_name(vm) # assert self.assertIsNone(current_snapshot_name)
def _get_snapshot_name_to_be_created(snapshot_name, vm): current_snapshot_name = SnapshotRetriever.get_current_snapshot_name(vm) if not current_snapshot_name: return snapshot_name return SnapshotRetriever.combine(current_snapshot_name, snapshot_name)
def _get_snapshot_name_to_be_created(snapshot_name, vm): current_snapshot_name = SnapshotRetriever.get_current_snapshot_name(vm) if not current_snapshot_name: return snapshot_name return SnapshotRetriever.combine(current_snapshot_name, snapshot_name)