mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-17 05:40:25 +00:00
25 lines
636 B
Python
25 lines
636 B
Python
"""
|
|
Make sure that the various IK classes can be successfully serialized and
|
|
deserialized. This is important when using IK with Celery.
|
|
|
|
"""
|
|
|
|
from .utils import create_photo, pickleback
|
|
|
|
|
|
def test_imagespecfield():
|
|
instance = create_photo('pickletest2.jpg')
|
|
thumbnail = pickleback(instance.thumbnail)
|
|
thumbnail.generate()
|
|
|
|
|
|
def test_circular_ref():
|
|
"""
|
|
A model instance with a spec field in its dict shouldn't raise a KeyError.
|
|
|
|
This corresponds to #234
|
|
|
|
"""
|
|
instance = create_photo('pickletest3.jpg')
|
|
instance.thumbnail # Cause thumbnail to be added to instance's __dict__
|
|
pickleback(instance)
|