Package openid :: Package test :: Module test_htmldiscover
[frames] | no frames]

Source Code for Module openid.test.test_htmldiscover

 1  from openid.consumer.discover import OpenIDServiceEndpoint 
 2  import datadriven 
 3   
4 -class BadLinksTestCase(datadriven.DataDrivenTestCase):
5 cases = [ 6 '', 7 "http://not.in.a.link.tag/", 8 '<link rel="openid.server" href="not.in.html.or.head" />', 9 ] 10
11 - def __init__(self, data):
14
15 - def runOneTest(self):
16 actual = OpenIDServiceEndpoint.fromHTML('http://unused.url/', self.data) 17 expected = [] 18 self.failUnlessEqual(expected, actual)
19
20 -def pyUnitTests():
21 return datadriven.loadTests(__name__)
22