class SimpleTestCase [source]
A subclass of unittest.TestCase that adds this functionality:
- Some useful assertions like:
- Checking that a callable
raises a certain exception. - Testing form field
rendering and error treatment. - Testing
HTML responses for the presence/lack of a given fragment. - Verifying that a template
has/hasn't been used to generate a given response content. - Verifying a HTTP
redirectis performed by the app. - Robustly testing two
HTML fragmentsfor equality/inequality orcontainment. - Robustly testing two
XML fragmentsfor equality/inequality. - Robustly testing two
JSON fragmentsfor equality.
- Checking that a callable
- The ability to run tests with modified settings.
- Using the
clientClient.
If your tests make any database queries, use subclasses TransactionTestCase or TestCase.
Please login to continue.