Refactored routing unit test for python 3, fixed routing errors in python 3