Пример #1
0
    def setUp(self):
        super(TestSnapshotShow, self).setUp()

        self.snapshots_mock.get.return_value = fakes.FakeResource(
            None, copy.deepcopy(volume_fakes.SNAPSHOT), loaded=True)
        # Get the command object to test
        self.cmd = snapshot.ShowSnapshot(self.app, None)
Пример #2
0
    def setUp(self):
        super(TestSnapshotShow, self).setUp()

        self.snapshot = volume_fakes.FakeSnapshot.create_one_snapshot()

        self.data = (
            self.snapshot.created_at,
            self.snapshot.description,
            self.snapshot.id,
            self.snapshot.name,
            utils.format_dict(self.snapshot.metadata),
            self.snapshot.size,
            self.snapshot.status,
            self.snapshot.volume_id,
        )

        self.snapshots_mock.get.return_value = self.snapshot
        # Get the command object to test
        self.cmd = snapshot.ShowSnapshot(self.app, None)