diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-09-16 10:57:32 -0400 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-09-16 12:54:10 -0400 |
| commit | e059bbec96ed85d5f4d63893d687c8af966430c8 (patch) | |
| tree | 0fbd94011560afe8b1fe47c92a34fe6977b00d78 /tests | |
| parent | 8c621e96422e037c3997c8c9515bc050620852f6 (diff) | |
Refs #27222 -- Deduplicated db_returning fields in Model.save().
Follow-up to 94680437a45a71c70ca8bd2e68b72aa1e2eff337.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/test_db_returning.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/queries/test_db_returning.py b/tests/queries/test_db_returning.py index 50c164a57f..06efe023e1 100644 --- a/tests/queries/test_db_returning.py +++ b/tests/queries/test_db_returning.py @@ -42,6 +42,16 @@ class ReturningValuesTests(TestCase): ), captured_queries[-1]["sql"], ) + self.assertEqual( + captured_queries[-1]["sql"] + .split("RETURNING ")[1] + .count( + connection.ops.quote_name( + ReturningModel._meta.get_field("created").column + ), + ), + 1, + ) self.assertTrue(obj.pk) self.assertIsInstance(obj.created, datetime.datetime) |
