convert test.py to use unittest