mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.core.
This commit is contained in:
committed by
Mariusz Felisiak
parent
37044817f9
commit
474cc420bf
@@ -501,7 +501,10 @@ class FileStorageTests(SimpleTestCase):
|
||||
Calling delete with an empty name should not try to remove the base
|
||||
storage directory, but fail loudly (#20660).
|
||||
"""
|
||||
with self.assertRaises(AssertionError):
|
||||
msg = 'The name must be given to delete().'
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
self.storage.delete(None)
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
self.storage.delete('')
|
||||
|
||||
def test_delete_deletes_directories(self):
|
||||
|
||||
Reference in New Issue
Block a user