@@ -23,29 +23,29 @@ def tearDown(self):
2323 def test_retina (self ):
2424 get_thumbnail (self .image , '50x50' )
2525
26+ cache_path = "test/cache/2c/0f/2c0f909d420e760b8dc4e1d1f79e705b"
2627 actions = [
27- ' exists: test/cache/91/bb/91bb06cf9169e4c52132bb113f2d4c0d .jpg' ,
28+ f" exists: { cache_path } .jpg" ,
2829
2930 # 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" ,
3435
3536 # 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" ,
3940
4041 # 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"
4445 ]
4546 self .assertEqual (self .log , actions )
4647
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" )
4949
5050 with open (path ) as fp :
5151 engine = PILEngine ()
0 commit comments