def setUp(self): super(TestSnapshotList, self).setUp() self.volumes_mock.list.return_value = [self.volume] self.snapshots_mock.list.return_value = self.snapshots # Get the command to test self.cmd = snapshot.ListSnapshot(self.app, None)
def setUp(self): super(TestSnapshotList, self).setUp() self.volumes_mock.list.return_value = [ fakes.FakeResource(None, copy.deepcopy(volume_fakes.VOLUME), loaded=True) ] self.snapshots_mock.list.return_value = [ fakes.FakeResource(None, copy.deepcopy(volume_fakes.SNAPSHOT), loaded=True) ] # Get the command to test self.cmd = snapshot.ListSnapshot(self.app, None)