Chapter 21.2. TurboGears testutil
Nose is great, but TurboGears apps are complicated beasts, and it is sometimes not so trivial to test them properly. The testutil module of TurboGears provides lots of shortcuts and convenient classes and functions you can use. You will use the famous bookmarker as a test bed. If you recall in Chapter 4, “Creating a Simple Application,†you already used testutil briefly to test your controllers and make sure they returned the proper data. The goal here is to make bookmarker a little more robust and to make sure that all bookmarks point to existing URLs (no 404 errors) and that there are no duplicate bookmarks (two bookmarks with the same name and/or same URL).
How do you test a TurboGears application? There ...
Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.