• Jérome Perrin's avatar
    ERP5TypeLiveTestCase: repair running live tests from zope · 055adae4
    Jérome Perrin authored
    This fixes a regression with 445e8fa8 (ERP5TypeTestCase: rework
    default manager password generation, 2024-05-27), it was no longer
    possible to run live tests from a "normal" zope instance, this was
    failing with:
    
    Traceback (most recent call last):
      File "./eggs/Zope-5.10-py3.9.egg/Testing/ZopeTestCase/PortalTestCase.py", line 59, in setUp
        self._setup()
      File "./parts/erp5/product/ERP5Type/tests/ERP5TypeLiveTestCase.py", line 156, in _setup
        self.login()
      File "./parts/erp5/product/ERP5Type/tests/ERP5TypeTestCase.py", line 290, in login
        return PortalTestCase.login(self, user_name)
      File "./eggs/Zope-5.10-py3.9.egg/Testing/ZopeTestCase/PortalTestCase.py", line 146, in login
        user = user.__of__(uf)
    AttributeError: 'NoneType' object has no attribute '__of__'
    
    It was only possible from a runUnitTest instance.
    055adae4
ERP5TypeLiveTestCase.py 11.4 KB