コード例 #1
0
ファイル: test_services.py プロジェクト: preethit/pulp-1
    def test_started(self, mock_task_started):
        dispatch_report = dict(succeeded=True)
        task_id = 'task_1'
        consumer_id = 'consumer_1'
        repo_id = 'repo_1'
        dist_id = 'dist_1'
        call_context = {
            'task_id': task_id,
            'consumer_id': consumer_id,
            'repo_id': repo_id,
            'distributor_id': dist_id
        }
        envelope = Envelope(routing=['A', 'B'], any=call_context)
        reply = Started(envelope)
        handler = ReplyHandler('')
        handler.started(reply)

        # validate task updated
        mock_task_started.assert_called_with(task_id)