Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/n/o/nova-HEAD/nova/tests/objects/test_instance_action.py   nova(Download)
    def test_event_finish(self, mock_finish):
        timeutils.set_time_override(override_time=NOW)
        expected_packed_values = compute_utils.pack_action_event_finish(
            self.context, 'fake-uuid', 'fake-event')
        mock_finish.return_value = fake_event
    def test_event_finish_no_result(self, mock_finish):
        timeutils.set_time_override(override_time=NOW)
        expected_packed_values = compute_utils.pack_action_event_finish(
            self.context, 'fake-uuid', 'fake-event')
        mock_finish.return_value = fake_event
    def test_event_finish_with_failure(self, mock_finish, mock_tb):
        mock_tb.return_value = 'fake-tb'
        timeutils.set_time_override(override_time=NOW)
        expected_packed_values = compute_utils.pack_action_event_finish(
            self.context, 'fake-uuid', 'fake-event', 'val', 'invalid-tb')
    def test_event_finish_with_failure_no_result(self, mock_finish, mock_tb):
        mock_tb.return_value = 'fake-tb'
        timeutils.set_time_override(override_time=NOW)
        expected_packed_values = compute_utils.pack_action_event_finish(
            self.context, 'fake-uuid', 'fake-event', 'val', 'invalid-tb')