Change test cases from pytest to unittest

all tests pass