Changes between Version 97 and Version 98 of DeveloperGuidelinesTesting
- Timestamp:
- 01/03/11 10:11:20 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelinesTesting
v97 v98 94 94 * http://www.python.org/doc/2.6/library/doctest.html 95 95 * e.g. http://127.0.0.1:8000/admin/default/test/sahana/default.py 96 To extend these to web applications, we have a module which uses [http://code.google.com/p/wsgi-intercept wsgi_intercept] & [http://cherrypy.org CherryPy]'s [http://cherrypy.org/browser/trunk/cherrypy/test/webtest.py WebTest]: {{{modules/s3 _test.py}}} [[BR]]96 To extend these to web applications, we have a module which uses [http://code.google.com/p/wsgi-intercept wsgi_intercept] & [http://cherrypy.org CherryPy]'s [http://cherrypy.org/browser/trunk/cherrypy/test/webtest.py WebTest]: {{{modules/s3/s3test.py}}} [[BR]] 97 97 This can be used from Controllers like: 98 98 {{{ 99 99 def login(): 100 100 """ Login 101 >>> from applications.sahana.modules.s3 _test import WSGI_Test101 >>> from applications.sahana.modules.s3.s3test import WSGI_Test 102 102 >>> test=WSGI_Test(db) 103 103 >>> '200 OK' in test.getPage('/sahana/%s/login' % module)