Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (30 sloc) 1.125 kB
c9e4212 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@2242 5dc97367-9…
alobbs authored
1 from base import *
2 from base64 import encodestring
3
4 DIR = 'authlist2'
5 LOGIN1 = "fake"
6 PASSWD1 = "barfoo"
7 LOGIN2 = "harry_potter"
8 PASSWD2 = "the-trick"
9
10 CONF = """
11 vserver!1!rule!1770!match = directory
12 vserver!1!rule!1770!match!directory = /%s
13 vserver!1!rule!1770!match!final = 0
14 vserver!1!rule!1770!auth = authlist
15 vserver!1!rule!1770!auth!methods = basic
16 vserver!1!rule!1770!auth!realm = Test
17 vserver!1!rule!1770!auth!list!1!user = %s
18 vserver!1!rule!1770!auth!list!1!password = %s
19 vserver!1!rule!1770!auth!list!2!user = %s
20 vserver!1!rule!1770!auth!list!2!password = %s
21 """ % (DIR, LOGIN1, PASSWD1, LOGIN2, PASSWD2)
22
23 class Test (TestBase):
24 def __init__ (self):
25 TestBase.__init__ (self, __file__)
26 self.name = "AuthList basic: match 2"
27 self.request = "GET /%s/ HTTP/1.0\r\n" % (DIR) + \
28 "Authorization: Basic %s\r\n" % (
29 encodestring ("%s:%s"%(LOGIN1,PASSWD1))[:-1])
30 self.expected_error = 200
31 self.conf = CONF
32
33 def Prepare (self, www):
34 d = self.Mkdir (www, DIR)
Something went wrong with that request. Please try again.