testing: fix `before_module` and `after_module` method recognition