Class TGTest
source code
unittest.TestCase --+
|
TGTest
A WebTest enabled unit testing class.
To use, subclass & set root to your controller object, or set app
to a webtest.TestApp instance.
In your tests, use self.app to make WebTest calls.
|
|
|
tearDown(self)
Tear down the WebTest by stopping the server. |
source code
|
|
|
login_user(self,
user)
Log a specified user object into the system. |
source code
|
|
|
root = None
hash(x)
|
|
app = None
hash(x)
|
|
stop_tg_only = False
hash(x)
|
|
config = None
hash(x)
|
Set up the WebTest by starting the server.
You should override this and make sure you have properly mounted a
root for your server before calling super, or simply pass a root
controller to super. Otherwise the CherryPy filters for TurboGears will
not be used.
|