예제 #1
0
 def test_unknownfile(self):
     assert get_mimetype('unknown.type') == 'application/octet-stream'
예제 #2
0
 def test_jpgfile(self):
     assert get_mimetype('file.jpg') == 'image/jpeg'
예제 #3
0
 def test_zipfile(self):
     assert get_mimetype('file.zip') == 'application/zip'
예제 #4
0
 def test_nofile(self):
     assert get_mimetype('not-a-file') == 'application/octet-stream'
예제 #5
0
 def test_txtfile(self):
     assert get_mimetype('file.txt') == 'text/plain'
예제 #6
0
 def test_unknownfile(self):
     assert get_mimetype('unknown.type') == 'application/octet-stream'
예제 #7
0
 def test_nofilename(self):
     assert get_mimetype(None) == 'application/octet-stream'
예제 #8
0
 def test_zipfile(self):
     assert get_mimetype('file.zip') == 'application/zip'
예제 #9
0
 def test_jpgfile(self):
     assert get_mimetype('file.jpg') == 'image/jpeg'
예제 #10
0
 def test_txtfile(self):
     assert get_mimetype('file.txt') == 'text/plain'
예제 #11
0
 def test_nofile(self):
     assert get_mimetype('not-a-file') == 'application/octet-stream'
예제 #12
0
 def test_nofilename(self):
     assert get_mimetype(None) == 'application/octet-stream'