File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 88from django .conf import settings
99from django .core .files .storage import default_storage
1010from django .core .files .uploadedfile import SimpleUploadedFile
11+ from django .db .models .fields .files import ImageFieldFile
1112from django .utils import version
1213from PIL import Image
1314
15+ from stdimage .models import StdImageFieldFile
16+
1417from . import models
1518from .models import (
1619 AdminDeleteModel ,
@@ -184,9 +187,14 @@ def test_variations_deepcopy(self, db):
184187 image = self .fixtures ["600x400.jpg" ]
185188 )
186189 instance = copy .deepcopy (instance_original )
190+ assert isinstance (instance .image , StdImageFieldFile )
191+
187192 assert hasattr (instance .image , "thumbnail" )
188193 assert hasattr (instance .image , "medium" )
189194
195+ assert isinstance (instance .image .thumbnail , ImageFieldFile )
196+ assert isinstance (instance .image .medium , ImageFieldFile )
197+
190198 source_file = self .fixtures ["600x400.jpg" ]
191199
192200 assert os .path .exists (os .path .join (IMG_DIR , "600x400.jpg" ))
You can’t perform that action at this time.
0 commit comments