示例#1
0
 def test_mimetype(self):
     filename = 'tests/test.png'
     with open(filename, "rb") as pic:
         output = filetype._magic_get_file_type(pic, filename)
         assert output == ('image/png')
示例#2
0
 def test_mimetype(self):
     filename = 'tests/test.png'
     with open(filename, "rb") as pic:
         output = filetype._magic_get_file_type(pic, filename)
         assert output == ('image/png')
示例#3
0
 def test_mimetype(self):
     filename = "tests/test.png"
     with open(filename, "rb") as pic:
         output = filetype._magic_get_file_type(pic, filename)
     assert output == "image/png"  # With 3.4 will fail if output is b'image/png'
示例#4
0
 def test_mimetype(self):
     filename = 'tests/test.png'
     with open(filename, "rb") as pic:
         output = filetype._magic_get_file_type(pic, filename)
     assert output == 'image/png'  # With 3.4 will fail if output is b'image/png'