fix: Test on macosx

Fix #630
pull/633/head
Raphaël Vinot 2020-09-16 12:07:55 +02:00
parent c39328f30a
commit 2e2cdbeb7e
1 changed files with 4 additions and 1 deletions

View File

@ -13,4 +13,7 @@ class TestFileObject(unittest.TestCase):
attributes = json.loads(file_object.to_json())['Attribute'] attributes = json.loads(file_object.to_json())['Attribute']
mime = next(attr for attr in attributes if attr['object_relation'] == 'mimetype') mime = next(attr for attr in attributes if attr['object_relation'] == 'mimetype')
# was "Python script, ASCII text executable" # was "Python script, ASCII text executable"
self.assertEqual(mime['value'], 'text/x-python') # libmagic on linux: 'text/x-python'
# libmagic on os x: 'text/x-script.python'
self.assertEqual(mime['value'][:7], 'text/x-')
self.assertEqual(mime['value'][-6:], 'python')