Example #1
0
    def test_create_fake_task(self):
        # Test
        response = task_simulator.create_fake_task_response()

        # Verify
        self.assertTrue(isinstance(response, Response))
        self.assertTrue(isinstance(response.response_body, Task))
Example #2
0
    def test_create_fake_task(self):
        # Test
        response = task_simulator.create_fake_task_response()

        # Verify
        self.assertTrue(isinstance(response, Response))
        self.assertTrue(isinstance(response.response_body, Task))
Example #3
0
    def setUp(self):
        super(ConsumerUnbindCommandTests, self).setUp()

        self.command = ConsumerUnbindCommand(self.context)

        self.mock_poll = mock.MagicMock()
        self.command.poll = self.mock_poll

        self.mock_unbind_binding = mock.MagicMock()
        self.mock_unbind_binding.return_value = task_simulator.create_fake_task_response()
        self.bindings.bind.unbind = self.mock_unbind_binding
Example #4
0
    def setUp(self):
        super(UnitCopyCommandTests, self).setUp()

        self.command = unit.UnitCopyCommand(self.context)

        self.mock_poll = mock.MagicMock().poll
        self.command.poll = self.mock_poll

        self.mock_copy_binding = mock.MagicMock().copy
        self.mock_copy_binding.return_value = task_simulator.create_fake_task_response()
        self.bindings.repo_unit.copy = self.mock_copy_binding
Example #5
0
    def setUp(self):
        super(TestUnitRemoveCommand, self).setUp()

        self.command = UnitRemoveCommand(self.context)

        self.mock_poll = mock.MagicMock().poll
        self.command.poll = self.mock_poll

        self.mock_remove_binding = mock.MagicMock().remove
        self.mock_remove_binding.return_value = task_simulator.create_fake_task_response()
        self.bindings.repo_unit.remove = self.mock_remove_binding
    def setUp(self):
        super(TestUnitRemoveCommand, self).setUp()

        self.command = UnitRemoveCommand(self.context)

        self.mock_poll = mock.MagicMock().poll
        self.command.poll = self.mock_poll

        self.mock_remove_binding = mock.MagicMock().remove
        self.mock_remove_binding.return_value = task_simulator.create_fake_task_response()
        self.bindings.repo_unit.remove = self.mock_remove_binding