<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/test/utils.py, branch stable/5.2.x</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=stable%2F5.2.x</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=stable%2F5.2.x'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2025-02-16T12:43:38Z</updated>
<entry>
<title>[5.2.x] Fixed #35967 -- Deferred test suite fixtures serialization after all dbs setup.</title>
<updated>2025-02-16T12:43:38Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2024-12-11T05:37:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=923c5daa10a255b23357b047fef530a73ce09129'/>
<id>urn:sha1:923c5daa10a255b23357b047fef530a73ce09129</id>
<content type='text'>
While the top-level objects fed to serialization are bound to the test
database being created nothing prevents code invoked during
serialization from performing queries against other connections entries
that haven't been swapped yet.

The reported example of that is a database router directing all reads to
a test mirror for a set of models involving auto-created many-to-many
fields. It might be tempting to address the many-to-many field case but
this a symptom of a larger problem where the test framework yields the
flow execution to user code that could interact with non-test databases
in unexpected ways.

Deferring test database fixture serialization until the point where all
connections entries have been swapped for their test equivalent ensures
that no code triggered during serialization can interact with non-test
databases.

Thanks Jake Howard for the report and Jacob Walls for the initial
investigation.

Backport of dc69a63f844b2ef3bc3371edde91644cf0bef0ee from main
</content>
</entry>
<entry>
<title>Refs #34986 -- Moved garbage_collect() helper to django.test.utils.</title>
<updated>2023-12-06T08:26:11Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2023-12-04T11:23:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=fb9216382a387685e1082ac97caa3feaf3d5fe80'/>
<id>urn:sha1:fb9216382a387685e1082ac97caa3feaf3d5fe80</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed typo in django/test/utils.py.</title>
<updated>2023-07-27T04:56:38Z</updated>
<author>
<name>Bruno Alla</name>
<email>alla.brunoo@gmail.com</email>
</author>
<published>2023-07-27T04:54:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a564f44350afc4823b9ff6eb14c56e8793ed4b31'/>
<id>urn:sha1:a564f44350afc4823b9ff6eb14c56e8793ed4b31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #32446 -- Removed SERIALIZE test database setting per deprecation timeline.</title>
<updated>2023-01-17T10:49:15Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2023-01-06T08:28:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=6c0539ed7c7a1ddeaac3ff91622ebf7a8c8442b9'/>
<id>urn:sha1:6c0539ed7c7a1ddeaac3ff91622ebf7a8c8442b9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #34118 -- Adopted asgiref coroutine detection shims.</title>
<updated>2022-12-20T10:10:48Z</updated>
<author>
<name>Carlton Gibson</name>
<email>carlton.gibson@noumenal.es</email>
</author>
<published>2022-12-20T10:10:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=32d70b2f55b1f74736fd11bc8efce890ad5fa2f0'/>
<id>urn:sha1:32d70b2f55b1f74736fd11bc8efce890ad5fa2f0</id>
<content type='text'>
Thanks to Mariusz Felisiak for review.</content>
</entry>
<entry>
<title>Used more augmented assignment statements.</title>
<updated>2022-10-31T11:30:13Z</updated>
<author>
<name>Nick Pope</name>
<email>nick@nickpope.me.uk</email>
</author>
<published>2022-01-28T20:15:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=d3cb91db87b78629c0d2682630e90a048275179e'/>
<id>urn:sha1:d3cb91db87b78629c0d2682630e90a048275179e</id>
<content type='text'>
Identified using the following command:

$ git grep -I '\(\&lt;[_a-zA-Z0-9]\+\&gt;\) *= *\1 *[-+/*^%&amp;|&lt;&gt;@]'
</content>
</entry>
<entry>
<title>Refs #33476 -- Refactored code to strictly match 88 characters line length.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2022-02-04T07:08:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=7119f40c9881666b6f9b5cf7df09ee1d21cc8344'/>
<id>urn:sha1:7119f40c9881666b6f9b5cf7df09ee1d21cc8344</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #33476 -- Reformatted code with Black.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>django-bot</name>
<email>ops@djangoproject.com</email>
</author>
<published>2022-02-03T19:24:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=9c19aff7c7561e3a82978a272ecdaad40dda5c00'/>
<id>urn:sha1:9c19aff7c7561e3a82978a272ecdaad40dda5c00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #20349 -- Avoided loading testing libraries when not needed.</title>
<updated>2022-01-25T10:41:01Z</updated>
<author>
<name>Collin Anderson</name>
<email>cmawebsite@gmail.com</email>
</author>
<published>2021-12-15T16:09:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=890bfa368c33d6ae19fe45cf1eed7e2e8d63160e'/>
<id>urn:sha1:890bfa368c33d6ae19fe45cf1eed7e2e8d63160e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #32655 -- Improved error if iter_test_cases() is passed a string.</title>
<updated>2021-06-29T18:41:40Z</updated>
<author>
<name>Chris Jerdonek</name>
<email>chris.jerdonek@gmail.com</email>
</author>
<published>2021-06-29T17:02:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=8bca838f4a230b78dd44fc1db3c1b81e444c6099'/>
<id>urn:sha1:8bca838f4a230b78dd44fc1db3c1b81e444c6099</id>
<content type='text'>
</content>
</entry>
</feed>
