fixing a test failure after https://lab.nexedi.com/nexedi/erp5/-/merge_requests/2101 and small cleanups in the test