tests: fix assert_nothing_captured