yes, it's intentional. this function is not used by any other test, why should be defined in class level than? it's OK in python to define one function inside another function.