Better code to import unittest in tests (copied from tornado)
Use six to compatible with python 2,3