Skip to content

Commit

Permalink
image service
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyubin2020 committed Aug 22, 2016
1 parent 7009ba1 commit b2c7cf8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def __test_to_file(self, original_image, new_image, image_style):
def __check(self, image_key, image_height, image_width, image_size, image_format):
result = self.bucket.get_object(image_key, process='image/info')
json_content = result.read()
decoded_json = json.loads(json_content);
decoded_json = json.loads(oss2.to_unicode(json_content))

self.assertEqual(int(decoded_json['ImageHeight']['value']), image_height);
self.assertEqual(int(decoded_json['ImageWidth']['value']), image_width);
self.assertEqual(int(decoded_json['FileSize']['value']), image_size);
self.assertEqual(decoded_json['Format']['value'], image_format);
self.assertEqual(int(decoded_json['ImageHeight']['value']), image_height)
self.assertEqual(int(decoded_json['ImageWidth']['value']), image_width)
self.assertEqual(int(decoded_json['FileSize']['value']), image_size)
self.assertEqual(decoded_json['Format']['value'], image_format)

def test_resize(self):
style = "image/resize,m_fixed,w_100,h_100" # 缩放
Expand Down

0 comments on commit b2c7cf8

Please sign in to comment.