diff options
author | Sachin Kelkar <sachinkel19@gmail.com> | 2017-02-10 22:40:19 +0530 |
---|---|---|
committer | Sachin Kelkar <sachinkel19@gmail.com> | 2017-02-10 22:40:19 +0530 |
commit | 8eb1d34644c454a79c168f6d68fc0ae45bbc4d1a (patch) | |
tree | df1927724408d027f7ab08aa3b90628d3bd56064 /test/mitmproxy | |
parent | c4e141a00087edb457df342884d147c5be8168a9 (diff) | |
download | mitmproxy-8eb1d34644c454a79c168f6d68fc0ae45bbc4d1a.tar.gz mitmproxy-8eb1d34644c454a79c168f6d68fc0ae45bbc4d1a.tar.bz2 mitmproxy-8eb1d34644c454a79c168f6d68fc0ae45bbc4d1a.zip |
Add app1 marker and tests
Diffstat (limited to 'test/mitmproxy')
-rw-r--r-- | test/mitmproxy/contentviews/test_image_parser.py | 23 | ||||
-rw-r--r-- | test/mitmproxy/data/image_parser/app1.jpeg | bin | 0 -> 82670 bytes | |||
-rw-r--r-- | test/mitmproxy/data/image_parser/image-err1.jpg | bin | 0 -> 82674 bytes |
3 files changed, 23 insertions, 0 deletions
diff --git a/test/mitmproxy/contentviews/test_image_parser.py b/test/mitmproxy/contentviews/test_image_parser.py index 6c78c07b..1595bba5 100644 --- a/test/mitmproxy/contentviews/test_image_parser.py +++ b/test/mitmproxy/contentviews/test_image_parser.py @@ -124,6 +124,29 @@ def test_parse_gif(filename, metadata): ('comment', "b'mitmproxy test image'"), ('Size', '256 x 256 px') ], + # check app1 + "mitmproxy/data/image_parser/app1.jpeg": [ + ('Format', 'JPEG (ISO 10918)'), + ('jfif_version', '(1, 1)'), + ('jfif_density', '(72, 72)'), + ('jfif_unit', '1'), + ('make', 'Canon'), + ('model', 'Canon PowerShot A60'), + ('modify_date', '2004:07:16 18:46:04'), + ('Size', '717 x 558 px') + ], + # check multiple segments + "mitmproxy/data/image_parser/image-err1.jpg": [ + ('Format', 'JPEG (ISO 10918)'), + ('jfif_version', '(1, 1)'), + ('jfif_density', '(72, 72)'), + ('jfif_unit', '1'), + ('image_description', '<<enter caption here>> on December 4, 2009 in Washington, DC.'), + ('make', 'Canon'), ('model', 'Canon EOS-1D Mark III'), + ('artist', 'Alex Wong'), + ('primary_chromaticities', '@\x00\x00\x00d'), + ('copyright', '2009 Getty Images') + ], }.items()) def test_parse_jpeg(filename, metadata): with open(tutils.test_data.path(filename), 'rb') as f: diff --git a/test/mitmproxy/data/image_parser/app1.jpeg b/test/mitmproxy/data/image_parser/app1.jpeg Binary files differnew file mode 100644 index 00000000..baa77dfe --- /dev/null +++ b/test/mitmproxy/data/image_parser/app1.jpeg diff --git a/test/mitmproxy/data/image_parser/image-err1.jpg b/test/mitmproxy/data/image_parser/image-err1.jpg Binary files differnew file mode 100644 index 00000000..1b251e6e --- /dev/null +++ b/test/mitmproxy/data/image_parser/image-err1.jpg |