• Jérome Perrin's avatar
    ERP5TypeTestCase: rework default manager password generation · 660219d1
    Jérome Perrin authored
    The default manager user (ERP5TypeTestCase) now have a random password
    generated at the beginning of test. The password is stored as a class
    attribute of the test case instance.
    Many tests have been updated to not generate manager user and use the
    existing one instead. When tests need to create users (for example
    users in the root acl_users), we try to give them a random password and
    to delete the users afterward.
    
    For functional tests, the approach is that ERP5TypeFunctionalTestCase
    sets cookies with manager username and password before running zelenium
    tests, so that in case tests want to log in again as manager, they can
    read the username and password from cookies.
    
    Another significant changes is that we no longer have the same user in
    ERP5/acl_users and /acl_users, some tests were logging in as the root
    user in ways that never seemed intentional.
    
    This also revealed (through test_manager_actions_on_portal from
    testERP5Core) that some tests were running with a user without all the
    expected permissions and the "Manager Components" actions was not
    visible for the default manager user. Fixing this also revealed that
    two actions ("Manage Components" and "Manage Callables") had the same
    priority, so the later was modified to use a different priority.
    660219d1
testOOoBatchMode.py 6.76 KB