class TestFriendList(unittest.TestCase): def setUp(self): self.tmpfilepath = tempfile.mktemp() self.tmpdirpath = os.path.join(tempfile.gettempdir(), 'testdb') self.flist = ExternalFriendList(friend_file=self.tmpfilepath, db_dir=self.tmpdirpath) def tearDown(self): self.flist.clear() try: os.remove(self.tmpfilepath) except Exception, msg: pass
class TestFriendList(unittest.TestCase): def setUp(self): self.tmpfilepath = tempfile.mktemp() self.tmpdirpath = os.path.join(tempfile.gettempdir(), 'testdb') self.flist = ExternalFriendList(friend_file=self.tmpfilepath, db_dir=self.tmpdirpath) def tearDown(self): self.flist.clear() try: os.remove(self.tmpfilepath) except Exception, msg: pass