summaryrefslogtreecommitdiff
path: root/tests/file_storage
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2024-08-09 12:45:44 -0400
committernessita <124304+nessita@users.noreply.github.com>2024-08-28 11:44:05 -0300
commit47f18a722624527cc72eef44cfc9d1e07ea4b4e0 (patch)
tree0c4de59fc1b465996d4ac767254ec600b356bed4 /tests/file_storage
parent52ed2b645e1dd8c9a874cfd21c4c9f2500032626 (diff)
Refs #35326 -- Adjusted deprecation warning stacklevel in FileSystemStorage.OS_OPEN_FLAGS.
Diffstat (limited to 'tests/file_storage')
-rw-r--r--tests/file_storage/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py
index bac88235b5..5f0024b81a 100644
--- a/tests/file_storage/tests.py
+++ b/tests/file_storage/tests.py
@@ -635,10 +635,11 @@ class OverwritingStorageOSOpenFlagsWarningTests(SimpleTestCase):
def test_os_open_flags_deprecation_warning(self):
msg = "Overriding OS_OPEN_FLAGS is deprecated. Use the allow_overwrite "
msg += "parameter instead."
- with self.assertWarnsMessage(RemovedInDjango60Warning, msg):
+ with self.assertWarnsMessage(RemovedInDjango60Warning, msg) as ctx:
self.storage = self.storage_class(
location=self.temp_dir, base_url="/test_media_url/"
)
+ self.assertEqual(ctx.filename, __file__)
# RemovedInDjango60Warning: Remove this test class.