Python test

i fix test/db.py to support python3