コード例 #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)
コード例 #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)
コード例 #3
0
ファイル: test_rpverify.py プロジェクト: 18600597055/hue
    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)
コード例 #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)
コード例 #5
0
ファイル: test_rpverify.py プロジェクト: ziima/python-openid
    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)
コード例 #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)