How to disallow users with a username containing test to login?
Custom username validation would be an option


  allows to define a validation pattern for the username on registration. it's also possible to customize the error message on validation failure.