3 from openid
.yadis
import services
4 from openid
.yadis
.discover
import DiscoveryFailure
, DiscoveryResult
7 class TestGetServiceEndpoints(unittest
.TestCase
):
9 self
.orig_discover
= services
.discover
10 services
.discover
= self
.discover
13 services
.discover
= self
.orig_discover
15 def discover(self
, input_url
):
16 result
= DiscoveryResult(input_url
)
17 result
.response_text
= "This is not XRDS text."
20 def test_catchXRDSError(self
):
21 self
.failUnlessRaises(DiscoveryFailure
,
22 services
.getServiceEndpoints
,
23 "http://example.invalid/sometest")