Refactor of test cases.

Replace assert calls to self.assert statements.