mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #12581 -- Adjusted warning stacklevel in queries ring buffer.
This commit is contained in:
@@ -558,8 +558,9 @@ class BackendTestCase(TransactionTestCase):
|
||||
"Limit for query logging exceeded, only the last 3 queries will be "
|
||||
"returned."
|
||||
)
|
||||
with self.assertWarnsMessage(UserWarning, msg):
|
||||
with self.assertWarnsMessage(UserWarning, msg) as ctx:
|
||||
self.assertEqual(3, len(new_connection.queries))
|
||||
self.assertEqual(ctx.filename, __file__)
|
||||
|
||||
finally:
|
||||
BaseDatabaseWrapper.queries_limit = old_queries_limit
|
||||
|
||||
Reference in New Issue
Block a user