comparison example/wsgibrowserid.py @ 38:4dfffa966edd

example/wsgibrowserid.py
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 27 Dec 2013 19:47:46 -0800
parents 6b5946843928
children
comparison
equal deleted inserted replaced
37:6b5946843928 38:4dfffa966edd
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 """ 3 """
4 test Mozilla persona auth 4 test Mozilla persona auth via wsgibrowserid
5 5
6 https://login.persona.org/about 6 https://github.com/ianb/wsgibrowserid
7 """ 7 """
8 8
9 import browserid
10 import optparse 9 import optparse
11 import os 10 import os
12 import sys 11 import sys
13 from webob import Request, Response, exc 12 from webob import Request, Response, exc
14 from wsgiref import simple_server 13 from wsgiref import simple_server
15 14
16 here = os.path.dirname(os.path.realpath(__file__)) 15 here = os.path.dirname(os.path.realpath(__file__))
17 page = os.path.join(here, 'persona.html') 16 page = os.path.join(here, 'wsgibrowserid.html')
18 17
19 class PersonaTest(object): 18 class PersonaTest(object):
20 def __init__(self, page=page): 19 def __init__(self, page=page):
21 self.page = page 20 self.page = page
22 assert os.path.exists(self.page), "File '%s' not found" % self.page 21 assert os.path.exists(self.page), "File '%s' not found" % self.page