Rewrite the test with pytest helpers

8 jobs for !3809 with fix-test-settings-dangling in 99 minutes and 45 seconds (queued for 3 minutes and 30 seconds)
latest merge request