Module test
Django Unit Test framework.
source linkRe-exported Classes
-
An async version of Client that creates ASGIRequests and calls through an async request path.
[django.test.client.AsyncClient]
-
Class that lets you create mock ASGI-like Request objects for use in testing. Usage:
[django.test.client.AsyncRequestFactory]
-
A class that can act as a client for testing purposes.
[django.test.client.Client]
-
Do basically the same as TransactionTestCase but also launch a live HTTP
[django.test.testcases.LiveServerTestCase]
-
Class that lets you create mock Request objects for use in testing.
[django.test.client.RequestFactory]
-
[django.test.testcases.SimpleTestCase]
-
Similar to TransactionTestCase, but use `transaction.atomic()` to achieve test isolation.
[django.test.testcases.TestCase]
-
[django.test.testcases.TransactionTestCase]
-
[django.test.utils.ignore_warnings]
-
Like override_settings, but makes it possible to append, prepend, or remove items instead of redefining the entire list.
[django.test.utils.modify_settings]
-
Act as either a decorator or a context manager. If it's a decorator, take a
[django.test.utils.override_settings]
-
Act as a decorator. Override list of registered system checks. Useful when you override `INSTALLED_APPS`, e.g. if you exclude `auth` app, you also need to exclude its system checks.
[django.test.utils.override_system_checks]
Re-exported Functions
Skip a test if a database has at least one of the named features.
[django.test.testcases.skipIfDBFeature]
Skip a test unless a database has any of the named features.
[django.test.testcases.skipUnlessAnyDBFeature]
Skip a test unless a database has all the named features.
[django.test.testcases.skipUnlessDBFeature]
Decorator to add tags to a test class or method.
[django.test.utils.tag]
Submodules