Python 3.* support. Move test outside package. Avoid redis connection each request. Pep8 fixes.