@@ -23,29 +23,29 @@ def tearDown(self):
23
23
def test_retina (self ):
24
24
get_thumbnail (self .image , '50x50' )
25
25
26
+ cache_path = "test/cache/2c/0f/2c0f909d420e760b8dc4e1d1f79e705b"
26
27
actions = [
27
- ' exists: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d .jpg' ,
28
+ f" exists: { cache_path } .jpg" ,
28
29
29
30
# save regular resolution, same as in StorageTestCase
30
- ' open: retina.jpg' ,
31
- ' save: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d .jpg' ,
32
- ' get_available_name: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d .jpg' ,
33
- ' exists: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d .jpg' ,
31
+ " open: retina.jpg" ,
32
+ f" save: { cache_path } .jpg" ,
33
+ f" get_available_name: { cache_path } .jpg" ,
34
+ f" exists: { cache_path } .jpg" ,
34
35
35
36
# save the 1.5x resolution version
36
- ' save: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d @1.5x.jpg' ,
37
- ' get_available_name: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d @1.5x.jpg' ,
38
- ' exists: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d @1.5x.jpg' ,
37
+ f" save: { cache_path } @1.5x.jpg" ,
38
+ f" get_available_name: { cache_path } @1.5x.jpg" ,
39
+ f" exists: { cache_path } @1.5x.jpg" ,
39
40
40
41
# save the 2x resolution version
41
- ' save: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d @2x.jpg' ,
42
- ' get_available_name: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d @2x.jpg' ,
43
- ' exists: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d @2x.jpg'
42
+ f" save: { cache_path } @2x.jpg" ,
43
+ f" get_available_name: { cache_path } @2x.jpg" ,
44
+ f" exists: { cache_path } @2x.jpg"
44
45
]
45
46
self .assertEqual (self .log , actions )
46
47
47
- path = os .path .join (settings .MEDIA_ROOT ,
48
- 'test/cache/91/bb/[email protected] ' )
48
+ path = os .path .join (settings .MEDIA_ROOT , f"{ cache_path } @1.5x.jpg" )
49
49
50
50
with open (path ) as fp :
51
51
engine = PILEngine ()
0 commit comments