def bad(name): with pytest.raises(ValidationError): UserManagement.validate_username(name)
def good(name): UserManagement.validate_username(name)