def test_unknownfile(self): assert get_mimetype('unknown.type') == 'application/octet-stream'
def test_jpgfile(self): assert get_mimetype('file.jpg') == 'image/jpeg'
def test_zipfile(self): assert get_mimetype('file.zip') == 'application/zip'
def test_nofile(self): assert get_mimetype('not-a-file') == 'application/octet-stream'
def test_txtfile(self): assert get_mimetype('file.txt') == 'text/plain'
def test_nofilename(self): assert get_mimetype(None) == 'application/octet-stream'