Added unittest module. Refactored testcase to use unittest assertions