@@ -336,8 +336,8 @@ def test_upload_thumbnail_in_create(self):
336
336
337
337
h = Http (".cache" )
338
338
thumb_resp , content = h .request (new_version .get ('image' ), "GET" )
339
- self .assertEqual (thumb_resp ['status' ], '200' )
340
- self .assertEqual (thumb_resp ['content-type' ], 'image/jpeg' )
339
+ self .assertIn (thumb_resp ['status' ], [ '200' , '304' ] )
340
+ self .assertIn (thumb_resp ['content-type' ], [ 'image/jpeg' , 'image/png' ] )
341
341
342
342
self .sg .delete ("Version" , new_version ['id' ])
343
343
@@ -378,8 +378,8 @@ def test_upload_thumbnail_for_version(self):
378
378
379
379
h = Http (".cache" )
380
380
thumb_resp , content = h .request (version_with_thumbnail .get ('image' ), "GET" )
381
- self .assertEqual (thumb_resp ['status' ], '200' )
382
- self .assertEqual (thumb_resp ['content-type' ], 'image/jpeg' )
381
+ self .assertIn (thumb_resp ['status' ], [ '200' , '304' ] )
382
+ self .assertIn (thumb_resp ['content-type' ], [ 'image/jpeg' , 'image/png' ] )
383
383
384
384
# clear thumbnail
385
385
response_clear_thumbnail = self .sg .update ("Version" , self .version ['id' ], {'image' : None })
@@ -405,8 +405,8 @@ def test_upload_thumbnail_for_task(self):
405
405
406
406
h = Http (".cache" )
407
407
thumb_resp , content = h .request (task_with_thumbnail .get ('image' ), "GET" )
408
- self .assertEqual (thumb_resp ['status' ], '200' )
409
- self .assertEqual (thumb_resp ['content-type' ], 'image/jpeg' )
408
+ self .assertIn (thumb_resp ['status' ], [ '200' , '304' ] )
409
+ self .assertIn (thumb_resp ['content-type' ], [ 'image/jpeg' , 'image/png' ] )
410
410
411
411
# clear thumbnail
412
412
response_clear_thumbnail = self .sg .update ("Version" , self .version ['id' ], {'image' : None })
@@ -510,8 +510,8 @@ def test_linked_thumbnail_url(self):
510
510
511
511
h = Http (".cache" )
512
512
thumb_resp , content = h .request (response_version_with_project .get ('project.Project.image' ), "GET" )
513
- self .assertEqual (thumb_resp ['status' ], '200' )
514
- self .assertEqual (thumb_resp ['content-type' ], 'image/jpeg' )
513
+ self .assertIn (thumb_resp ['status' ], [ '200' , '304' ] )
514
+ self .assertIn (thumb_resp ['content-type' ], [ 'image/jpeg' , 'image/png' ] )
515
515
516
516
else :
517
517
expected_version_with_project = {
@@ -2067,8 +2067,8 @@ def test_humanuser_upload_thumbnail_for_version(self):
2067
2067
2068
2068
h = Http (".cache" )
2069
2069
thumb_resp , content = h .request (version_with_thumbnail .get ('image' ), "GET" )
2070
- self .assertEqual (thumb_resp ['status' ], '200' )
2071
- self .assertEqual (thumb_resp ['content-type' ], 'image/jpeg' )
2070
+ self .assertIn (thumb_resp ['status' ], [ '200' , '304' ] )
2071
+ self .assertIn (thumb_resp ['content-type' ], [ 'image/jpeg' , 'image/png' ] )
2072
2072
2073
2073
# clear thumbnail
2074
2074
response_clear_thumbnail = self .sg .update ("Version" , self .version ['id' ], {'image' : None })
@@ -2124,8 +2124,8 @@ def test_humanuser_upload_thumbnail_for_version(self):
2124
2124
2125
2125
h = Http (".cache" )
2126
2126
thumb_resp , content = h .request (version_with_thumbnail .get ('image' ), "GET" )
2127
- self .assertEqual (thumb_resp ['status' ], '200' )
2128
- self .assertEqual (thumb_resp ['content-type' ], 'image/jpeg' )
2127
+ self .assertIn (thumb_resp ['status' ], [ '200' , '304' ] )
2128
+ self .assertIn (thumb_resp ['content-type' ], [ 'image/jpeg' , 'image/png' ] )
2129
2129
2130
2130
# clear thumbnail
2131
2131
response_clear_thumbnail = self .sg .update ("Version" , self .version ['id' ], {'image' : None })
0 commit comments