mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-04-29 17:14:42 +00:00
Test that there isn't IO done when you get a URL
This commit is contained in:
parent
00b4388245
commit
bbf48a7953
1 changed files with 12 additions and 0 deletions
|
|
@ -35,3 +35,15 @@ def test_no_io_on_bool():
|
|||
bool(file)
|
||||
assert_false(file.storage.exists.called)
|
||||
assert_false(file.storage.open.called)
|
||||
|
||||
|
||||
def test_no_io_on_url():
|
||||
"""
|
||||
When getting the URL of an ImageCacheFile, the storage shouldn't be
|
||||
checked.
|
||||
|
||||
"""
|
||||
file = get_image_cache_file()
|
||||
file.url
|
||||
assert_false(file.storage.exists.called)
|
||||
assert_false(file.storage.open.called)
|
||||
|
|
|
|||
Loading…
Reference in a new issue