Add teardown functionality in unittest.