Made testcases pytest compatible