Fix test_network unit tests, and new pep8 errors