'Build a discovery URL out of the realm and a return_to and
make sure that it matches the expected discovery URL'

def failUnlessDiscoURL(self, realm, expected_discovery_url):

    realm_obj = trustroot.TrustRoot.parse(realm)
    actual_discovery_url = realm_obj.buildDiscoveryURL()
    self.failUnlessEqual(expected_discovery_url, actual_discovery_url)
