Changeset 1103
- Timestamp:
- 05/10/06 02:37:40
- Files:
-
- trunk/cherrypy/test/test_virtualhost_filter.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/test/test_virtualhost_filter.py
r1096 r1103 14 14 return "Under construction" 15 15 dom4.exposed = True 16 16 17 def method(self, value): 18 return "You sent %s" % repr(value) 19 method.exposed = True 20 17 21 class VHost: 18 22 def __init__(self, sitename): … … 22 26 return "Welcome to %s" % self.sitename 23 27 index.exposed = True 24 25 28 29 def vmethod(self, value): 30 return "You sent %s" % repr(value) 31 vmethod.exposed = True 32 33 26 34 root = Root() 27 35 root.mydom2 = VHost("Domain 2") … … 54 62 self.getPage("/", [('Host', 'www.mydom4.com')]) 55 63 self.assertBody('Under construction') 64 65 # Test GET, POST, and positional params 66 self.getPage("/method?value=root") 67 self.assertBody("You sent 'root'") 68 self.getPage("/vmethod?value=dom2+GET", [('Host', 'www.mydom2.com')]) 69 self.assertBody("You sent 'dom2 GET'") 70 self.getPage("/vmethod", [('Host', 'www.mydom3.com')], method="POST", 71 body="value=dom3+POST") 72 self.assertBody("You sent 'dom3 POST'") 73 self.getPage("/vmethod/pos", [('Host', 'www.mydom3.com')]) 74 self.assertBody("You sent 'pos'") 56 75 57 76

