Fix tests for python3.
Allow stubbing unbound class methods by attrname in python3.