O'Reilly logo

Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites by Gigi Sayfan, Kevin Dangoor, Mark Ramm

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required