def test_equal(self): with patch('openid.yadis.services.getServiceEndpoints', autospec=True, return_value=('http://example.com/', sentinel.endpoints)): endpoints = getAllowedReturnURLs('http://example.com/') self.assertEqual(endpoints, sentinel.endpoints)
def test_normalized(self): # Test redirect is not reported when the returned URL is normalized. with patch('openid.yadis.services.getServiceEndpoints', autospec=True, return_value=('http://example.com/', sentinel.endpoints)): endpoints = getAllowedReturnURLs('http://example.com:80') self.assertEqual(endpoints, sentinel.endpoints)
def failUnlessXRDSHasReturnURLs(self, data, expected_return_urls): self.data = data actual_return_urls = list(trustroot.getAllowedReturnURLs( self.disco_url)) self.failUnlessEqual(expected_return_urls, actual_return_urls)
def assertReturnURLs(self, data, expected_return_urls): self.data = data actual_return_urls = trustroot.getAllowedReturnURLs(self.disco_url) self.assertEqual(actual_return_urls, expected_return_urls)
def failUnlessXRDSHasReturnURLs(self, data, expected_return_urls): self.data = data actual_return_urls = list( trustroot.getAllowedReturnURLs(self.disco_url)) self.failUnlessEqual(expected_return_urls, actual_return_urls)