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
redirect
is performed by the app. - Robustly testing two
HTML fragments
for equality/inequality orcontainment
. - Robustly testing two
XML fragments
for equality/inequality. - Robustly testing two
JSON fragments
for equality.
- Checking that a callable
- The ability to run tests with modified settings.
- Using the
client
Client
.
If your tests make any database queries, use subclasses TransactionTestCase
or TestCase
.
Please login to continue.