Commit 952d74b0 authored by Jérome Perrin's avatar Jérome Perrin

testOooInterface: use zope.interface built in verify utility

instead of re-implementing our own. Updating to zope.interface 5.4
caused test failures:

      File "cloudooo/handler/ooo/tests/testOooInterface.py", line 90, in testIOdfDocument
        self.assertEquals(IOdfDocument.names(), method_list)
    AssertionError: Lists differ: ['getFile', 'source_format', '... != ['getContentXml', 'parsed_cont...

    First differing element 0:
    'getFile'
    'getContentXml'

    - ['getFile', 'source_format', 'getContentXml', 'parsed_content']
    + ['getContentXml', 'parsed_content', 'source_format', 'getFile']

This is because Interface.name() order is unspecified.

As we could see in the XXX comments in the test, hardcoding the method
names from the interface was not ideal, using the built-in verifyClass
is better because it performs more checks and because error reporting
is also much more detailed.

cf. https://zopeinterface.readthedocs.io/en/latest/verify.html
parent b2703b2d
Pipeline #23200 passed with stage
in 0 seconds