mirror of
https://github.com/Hopiu/django.git
synced 2026-03-21 08:20:30 +00:00
When using a TransactionTestCase with serialized_rollback=True, after creating the database and running its migrations (along with emitting the post_migrate signal), the contents of the database are serialized to _test_serialized_contents. After the first test case, _fixture_teardown() would flush the tables but then the post_migrate signal would be emitted and new rows (with new PKs) would be created in the django_content_type table. Then in any subsequent test cases in a suite, _fixture_setup() attempts to deserialize the content of _test_serialized_contents, but these rows are identical to the rows already in the database except for their PKs. This causes an IntegrityError due to the unique constraint in the django_content_type table. This change made it so that in the above scenario the post_migrate signal is not emitted after flushing the tables, since it will be repopulated during fixture_setup(). |
||
|---|---|---|
| .. | ||
| _ext | ||
| _theme | ||
| faq | ||
| howto | ||
| internals | ||
| intro | ||
| man | ||
| misc | ||
| ref | ||
| releases | ||
| topics | ||
| conf.py | ||
| contents.txt | ||
| glossary.txt | ||
| index.txt | ||
| make.bat | ||
| Makefile | ||
| README | ||
| spelling_wordlist | ||
The documentation in this tree is in plain text files and can be viewed using any text file viewer. It uses ReST (reStructuredText) [1], and the Sphinx documentation system [2]. This allows it to be built into other forms for easier viewing and browsing. To create an HTML version of the docs: * Install Sphinx (using ``pip install Sphinx`` or some other method) * In this docs/ directory, type ``make html`` (or ``make.bat html`` on Windows) at a shell prompt. The documentation in _build/html/index.html can then be viewed in a web browser. [1] http://docutils.sourceforge.net/rst.html [2] http://sphinx-doc.org/