Commit 6bcf4c60 authored by Priscila Manhaes's avatar Priscila Manhaes

refactor to remove duplicate code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@43645 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3c6c57f4
......@@ -36,17 +36,8 @@ class TestInterface(unittest.TestCase):
def testIHandler(self):
"""Test if Handlers implements IHandler"""
# XXX this might verify FFMPEGHandler methods too
self.assertTrue(IHandler.implementedBy(FFMPEGHandler))
method_list = ['convert', 'getMetadata', 'setMetadata']
for method in method_list:
self.assertTrue(method in IHandler.names(),
"Method %s is not declared" % method)
self.assertEquals(len(method_list), len(IHandler.names()))
self.assertEquals(IHandler.get('convert').required, ('destination_format',))
self.assertEquals(IHandler.get('getMetadata').required,
('converted_data',))
self.assertEquals(IHandler.get('setMetadata').required,
('metadata_dict',))
def test_suite():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment