unit_tests: In test_name_methods, use "Pythonic" len(), slice and == operators.