Fix PythonAlgorithmTraitsTest

The object returned from the factory now has been downcast to the
correct type in Python meaning in the tests the methods are bypassing
the base class in some cases.
Refs #9513