def setUp(self):
        super(TestVolumeCreate, self).setUp()

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

        # Get the command object to test
        self.cmd = volume.CreateVolume(self.app, None)
Example #2
0
    def setUp(self):
        super(TestVolumeCreate, self).setUp()
        self.new_volume = volume_fakes.FakeVolume.create_one_volume()
        self.datalist = (
            self.new_volume.attachments,
            self.new_volume.availability_zone,
            self.new_volume.bootable,
            self.new_volume.created_at,
            self.new_volume.display_description,
            self.new_volume.id,
            self.new_volume.display_name,
            utils.format_dict(self.new_volume.metadata),
            self.new_volume.size,
            self.new_volume.snapshot_id,
            self.new_volume.status,
            self.new_volume.volume_type,
        )
        self.volumes_mock.create.return_value = self.new_volume

        # Get the command object to test
        self.cmd = volume.CreateVolume(self.app, None)