Implement mime.get_mime_parents using python
This is the only method pending implemented in c, then we can remove seven files previously used. Add a test for a corner case untested previously Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
This commit is contained in:
committed by
Daniel Narvaez
parent
faa0d42084
commit
b02ade879a
@@ -35,6 +35,10 @@ class TestMime(unittest.TestCase):
|
||||
self.assertListEqual(mime.get_mime_parents("image/svg+xml"),
|
||||
["application/xml"])
|
||||
|
||||
# If the mime type don't have parents, should return a empty array
|
||||
self.assertListEqual(mime.get_mime_parents("application/octet-stream"),
|
||||
[])
|
||||
|
||||
def test_get_for_file(self):
|
||||
self.assertEqual(mime.get_for_file(os.path.join(data_dir, "mime.svg")),
|
||||
'image/svg+xml')
|
||||
|
||||
Reference in New Issue
Block a user