'If an endpoint matches, we return it'

def test_matches(self):

    matching_endpoint = 'matching    endpoint'
    self.discovery_result = (None, [matching_endpoint])
    def returnTrue(unused1, unused2):
        return True
    self.consumer._verifyDiscoverySingle = returnTrue
    result = self.consumer._discoverAndVerify('http://claimed.id/', [self.to_match])
    self.failUnlessEqual(matching_endpoint, result)
