diff options
| author | Simon Charette <charette.s@gmail.com> | 2024-08-09 12:57:58 -0400 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2024-08-28 11:44:05 -0300 |
| commit | a69f895d7de198d7082cd7275390fa2d2a3d5619 (patch) | |
| tree | 7724b58b65376848233c493eab703a1c7a0ec1ac /tests/backends | |
| parent | c042fe3a74fb213c93b1052f7de4d99a6e6948e0 (diff) | |
Refs #34547 -- Adjusted deprecation warning stacklevel in DatabaseOperations.field_cast_sql().
Diffstat (limited to 'tests/backends')
| -rw-r--r-- | tests/backends/base/test_operations.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/backends/base/test_operations.py b/tests/backends/base/test_operations.py index 8df02ee76b..18433352ad 100644 --- a/tests/backends/base/test_operations.py +++ b/tests/backends/base/test_operations.py @@ -239,8 +239,9 @@ class DeprecationTests(TestCase): "DatabaseOperations.field_cast_sql() is deprecated use " "DatabaseOperations.lookup_cast() instead." ) - with self.assertRaisesMessage(RemovedInDjango60Warning, msg): + with self.assertWarnsMessage(RemovedInDjango60Warning, msg) as ctx: base_ops.field_cast_sql("integer", "IntegerField") + self.assertEqual(ctx.filename, __file__) def test_field_cast_sql_usage_warning(self): compiler = Author.objects.all().query.get_compiler(connection.alias) |
