Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (33 sloc) 0.972 kb
88b7210 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@2297 5dc97367-97f1...
alobbs authored
1 from base import *
2
3 DIR = "ssi2"
4 MAGIC = '<a href="http://www.alobbs.com/">Alvaro</a>'
5 INC = "test_183.inc"
6 FILE = "example.shtml"
7
8 CONF = """
9 vserver!1!rule!1830!match = directory
10 vserver!1!rule!1830!match!directory = /%s
11 vserver!1!rule!1830!handler = ssi
12 """ % (DIR)
13
14 FILE_CONTENT = """
15 <html>
16 <head>
17 <title>Cherokee QA Test: SSI 'virtual' include</title>
18 <!-- example -->
19 </head>
20 <body>
21 <!--#include virtual="%s" -->
22 </body>
23 </html>
24 """ % (INC)
25
26 class Test (TestBase):
27 def __init__ (self):
28 TestBase.__init__ (self, __file__)
29 self.name = "SSI: include virtual"
30 self.request = "GET /%s/%s HTTP/1.0\r\n"%(DIR, FILE)
31 self.expected_error = 200
32 self.expected_content = MAGIC
33 self.conf = CONF
34
35 def Prepare (self, www):
36 d = self.Mkdir (www, DIR)
37 self.WriteFile (d, FILE, 0444, FILE_CONTENT)
38 self.WriteFile (www, INC, 0444, MAGIC)
39
Something went wrong with that request. Please try again.