Skip to content

Commit 91c867b

Browse files
committed
Adds docs
1 parent 1130721 commit 91c867b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/database.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,22 @@ tests.
267267

268268
This fixture is by default requested from :fixture:`django_db_setup`.
269269

270+
271+
django_testcase
272+
"""""""""""""""
273+
274+
.. fixture:: django_testcase
275+
276+
Provides access to Django's test case instance.
277+
278+
:fixture:`django_testcase` can be used to access Django's `custom assertion methods <https://docs.djangoproject.com/en/dev/topics/testing/tools/#assertions/>`_ that are useful for testing web applications::
279+
280+
def test_add(django_testcase):
281+
django_testcase.assertEqual(1 + 1, 2)
282+
django_testcase.assertXMLEqual(..., ...)
283+
django_testcase.assertJSONEqual(..., ...)
284+
285+
270286
django_db_blocker
271287
"""""""""""""""""
272288

0 commit comments

Comments
 (0)