convert a testcase into a unittest (bug #19666)