'Test the waiting for an introduction candidate'

@blocking_call_on_reactor_thread
@inlineCallbacks
def test_wait_for_intro_candidate(self):

    mock_candidate = MockObject()
    mock_candidate.sock_addr = None
    (node,) = (yield self.create_nodes(1))
    deferred = node.community.wait_for_intro_of_candidate(mock_candidate)
    node.community.expected_intro_responses[mock_candidate.sock_addr].callback(None)
    (yield deferred)
