Kaydet (Commit) b0b45f9a authored tarafından Tim Graham's avatar Tim Graham

Fixed #26132 -- Discouraged use of TransactionTestCase.fixtures.

üst 2d36c7d5
...@@ -1037,9 +1037,9 @@ Fixture loading ...@@ -1037,9 +1037,9 @@ Fixture loading
.. attribute:: TransactionTestCase.fixtures .. attribute:: TransactionTestCase.fixtures
A test case for a database-backed website isn't much use if there isn't any A test case for a database-backed website isn't much use if there isn't any
data in the database. To make it easy to put test data into the database, data in the database. Tests are more readable and it's more maintainable to
Django's custom ``TransactionTestCase`` class provides a way of loading create objects using the ORM, for example in :meth:`TestCase.setUpTestData`,
**fixtures**. however, you can also use fixtures.
A fixture is a collection of data that Django knows how to import into a A fixture is a collection of data that Django knows how to import into a
database. For example, if your site has user accounts, you might set up a database. For example, if your site has user accounts, you might set up a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment