Removed deprecated api usage in training_algorithms/tests
Fixed a pep8 error
Merge pull request #1167 from yelite/clean-deprecation-api

Removed deprecated api usage in training_algorithms/tests