mirror of
https://github.com/django/django.git
synced 2025-03-26 17:20:49 +00:00
Fixed monkeypatching in a staticfiles test.
This commit is contained in:
parent
428c0bbe1b
commit
a4553e0510
@ -279,14 +279,16 @@ class TestConfiguration(StaticFilesTestCase):
|
|||||||
command = collectstatic.Command()
|
command = collectstatic.Command()
|
||||||
self.assertFalse(command.is_local_storage())
|
self.assertFalse(command.is_local_storage())
|
||||||
|
|
||||||
storage.staticfiles_storage = storage.FileSystemStorage()
|
collectstatic.staticfiles_storage = storage.FileSystemStorage()
|
||||||
command = collectstatic.Command()
|
command = collectstatic.Command()
|
||||||
self.assertTrue(command.is_local_storage())
|
self.assertTrue(command.is_local_storage())
|
||||||
|
|
||||||
storage.staticfiles_storage = DummyStorage()
|
collectstatic.staticfiles_storage = DummyStorage()
|
||||||
command = collectstatic.Command()
|
command = collectstatic.Command()
|
||||||
self.assertFalse(command.is_local_storage())
|
self.assertFalse(command.is_local_storage())
|
||||||
finally:
|
finally:
|
||||||
|
staticfiles_storage._wrapped = empty
|
||||||
|
collectstatic.staticfiles_storage = staticfiles_storage
|
||||||
storage.staticfiles_storage = staticfiles_storage
|
storage.staticfiles_storage = staticfiles_storage
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user