[test] make hook tests pass with cubicweb 3.22 (related to #10624160) [applied]