Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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)
Esempio n. 4
0
    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)
Esempio n. 5
0
    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)
Esempio n. 6
0
    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)