Flake8 remaining Python integration tests

This completes the flake8 fixing of the Python integration tests. The tests should still pass barring the usual intermittent fails, they should all pass flake8 checks.