Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1453

Show
Ignore:
Timestamp:
11/27/06 17:00:45
Author:
fumanchu
Message:

Test case for #607 (virtual_host and staticdir tools don't play well together).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/test/test_virtualhost.py

    r1440 r1453  
    1  
    21from cherrypy.test import test 
    32test.prefer_parent_path() 
     3 
     4import os 
     5curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) 
    46 
    57import cherrypy 
     
    3537            return cherrypy.url("nextpage") 
    3638        url.exposed = True 
     39         
     40        static = cherrypy.tools.staticdir.handler(section='/static', dir=curdir) 
    3741     
    3842     
     
    8185        self.getPage("/url", [('Host', 'www.mydom2.com')]) 
    8286        self.assertBody("%s://www.mydom2.com/nextpage" % self.scheme) 
     87     
     88    def test_VHost_plus_Static(self): 
     89        self.getPage("/static/style.css", [('Host', 'www.mydom2.com')]) 
     90        self.assertStatus('200 OK') 
     91        self.assertHeader('Content-Type', 'text/css') 
    8392 
    8493 

Hosted by WebFaction

Log in as guest/cpguest to create tickets