summaryrefslogtreecommitdiff
path: root/tests/multiple_database
AgeCommit message (Collapse)Author
2025-03-11Fixed #36177 -- Added a trailing newline to JSON serializer. (#19232)Tom Carrick
2024-02-05Fixed #16281 -- Fixed ContentType.get_object_for_this_type() in a multiple ↵Ben Cail
database setup.
2023-03-09Fixed #33985 -- Used app_config.verbose_name in ContentType.__str__().Hrushikesh Vaidya
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-02-22Removed redundant QuerySet.all() calls in docs and tests.Nick Pope
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-07-05Fixed isolation of RouterTestCase.test_m2m_cross_database_protection().Mariusz Felisiak
Hardcoded pks are necessary for this test case, however we need to set them for all new rows because the sequence will not increment automatically. It works when the sequence is incremented by other test cases.
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2020-04-07Enforced uniqueness of natural keys used in tests.Mariusz Felisiak
2020-01-20Refs #31117 -- Made various tests properly handle unexpected databases aliases.Matthijs Kooijman
- Used selected "databases" instead of django.db.connections. - Made routers in tests.migrations skip migrations on unexpected databases. - Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook which properly asserts messages about skipped databases.
2019-02-07Fixed #16027 -- Added app_label to ContentType.__str__().Gregory N. Schmit
2019-01-10Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in ↵Simon Charette
favor of databases.
2018-12-27Followed style guide for model attribute ordering.Matt Wiens
2018-11-27Switched TestCase to SimpleTestCase where possible in Django's tests.Tim Graham
2018-05-10Fixed #27629 -- Added router.allow_relation() calls for assignments between ↵Stefan R. Filipek
unsaved model instances.
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2018-01-02Fixed #28974 -- Made refresh_from_db() hint routers about its instance.Simon Charette
2017-07-31Removed a primary key value dependency in a multiple_database test.Tim Graham
Follow up to a51c4de1945be2225f20fad794cfb52d8f1f9236.
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-03-17Replaced type-specific assertions with assertEqual().Tim Graham
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-02-01Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.Vytis Banaitis
2017-01-28Refs #27790 -- Reverted "Removed available_apps on TestCase subclasses."Tim Graham
This reverts commit 91023d79ec70df9289271e63a67675ee51e7dea8 as it increases memory usage for the test suite.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-13Removed available_apps on TestCase subclasses.Simon Charette
TestCase subclasses are wrapped in a transaction that prevents any data from being persisted between test runs andi thus don't require limiting the tables to be flushed to a subset of available apps like TransactionTestCase subclasses do.
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-07Removed unused lines in multiple_database test.Tim Graham
2016-06-28Replaced use of TestCase.fail() with assertRaises().Tim Graham
Also removed try/except/fail antipattern that hides exceptions.
2016-06-27Fixed #26784 -- Made ForeignKey.validate() pass `model` to router if ↵Ben Demboski
model_instance=None.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-10-27Fixed #25550 -- Deprecated direct assignment to the reverse side of a ↵Tim Graham
related set.
2015-09-23Refs #24351 -- Removed support for the old allow_migrate() signature per ↵Tim Graham
deprecation timeline.
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-07-28Fixed #18556 -- Allowed RelatedManager.add() to execute 1 query where possible.Tim Graham
Thanks Loic Bistuer for review.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-04-28Fixed #24714 -- Used more specific assertions than assertEqual in tests.Alasdair Nicol
2015-02-21Fixed allow_migrate signature in one of the tests.Loic Bistuer
Refs #24351.
2015-02-20Fixed #24351, #24346 -- Changed the signature of allow_migrate().Loic Bistuer
The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-17Removed support for initial_data fixtures per deprecation timeline.Tim Graham