summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Wobrock <david.wobrock@gmail.com>2022-08-24 21:14:32 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-08-27 15:03:48 +0200
commit806e9e2d0dcf8f58e376fb7e2a8b9771e2a9ce16 (patch)
treeae903f4d6f931f42ecc53b4adedb0c4afc7b6742 /tests
parent0701bb8e1f1771b36cdde45602ad377007e372b3 (diff)
Fixed #33952 -- Reallowed creating reverse foreign key managers on unsaved instances.
Thanks Claude Paroz for the report. Regression in 7ba6ebe9149ae38257d70100e8bfbfd0da189862.
Diffstat (limited to 'tests')
-rw-r--r--tests/many_to_one/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/many_to_one/tests.py b/tests/many_to_one/tests.py
index d9a8984c4c..ae9bce6b44 100644
--- a/tests/many_to_one/tests.py
+++ b/tests/many_to_one/tests.py
@@ -758,6 +758,9 @@ class ManyToOneTests(TestCase):
)
with self.assertRaisesMessage(ValueError, msg):
th.child_set.count()
+ # The reverse foreign key manager can be created.
+ self.assertEqual(th.child_set.model, Third)
+
th.save()
# Now the model is saved, so we will need to execute a query.
with self.assertNumQueries(1):