Fixed python 3 compatiblity issue in the test files.

Added status badges of codeq.io and travis-ci.org.