Commit c9f96da1 authored by ale's avatar ale
Browse files

make the mod_sso .htaccess test use its own SSOService

parent 8b6827ec
AuthType SSO
Require user testuser
......@@ -96,8 +96,8 @@ class HttpdIntegrationTest(unittest.TestCase):
def tearDown(self):
def _ticket(self, user="testuser", group="group1"):
t = sso.Ticket(user, "", "", set([group]))
def _ticket(self, user="testuser", group="group1", service=""):
t = sso.Ticket(user, service, "", set([group]))
signedt = self.signer.sign(t)
print 'ticket:', signedt
return signedt
......@@ -172,15 +172,15 @@ class HttpdIntegrationTest(unittest.TestCase):
("protected-htaccess -> redirect",
{"url": "/protected-htaccess/index.html",
"status": 302,
"location": ""}),
"location": ""}),
("protected-htaccess with cookie -> ok",
{"url": "/protected-htaccess/index.html",
"cookie": mkcookie(self._ticket()),
"cookie": mkcookie(self._ticket(service="")),
"status": 200,
"body": "ok"}),
("protected-htaccess with cookie wrong user -> fail",
{"url": "/protected-htaccess/index.html",
"cookie": mkcookie(self._ticket(user="wronguser")),
"cookie": mkcookie(self._ticket(user="wronguser", service="")),
"status": 401 }),
for name, check in checks:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment