Added integration tests
Fixed unit tests for python 2.7