[PY3] Added wrapper for Python 2/3 test compat.
[PY3] Made compression in test_api 2/3 compatible.
[PY3] Removed extra string conversion in sqlite cache.