Exemplo n.º 1
0
 def test_create_and_get_volume(self):
     mock_service = self.mock_cinder.return_value
     scenario = volumes.CreateAndGetVolume(self._get_context())
     scenario.run(1, fakearg="f")
     mock_service.create_volume.assert_called_once_with(1, fakearg="f")
     mock_service.get_volume.assert_called_once_with(
         mock_service.create_volume.return_value.id)
Exemplo n.º 2
0
 def test_create_and_get_volume(self):
     scenario = volumes.CreateAndGetVolume(self.context)
     scenario._create_volume = mock.MagicMock()
     scenario._get_volume = mock.MagicMock()
     scenario.run(1, fakearg="f")
     scenario._create_volume.assert_called_once_with(1, fakearg="f")
     scenario._get_volume.assert_called_once_with(
         scenario._create_volume.return_value.id)