autopep8'ing integration test sources
extracting function, adding debug logging
minor refactoring: function name