コード例 #1
0
ファイル: test_friend.py プロジェクト: Devristo/tribler
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
コード例 #2
0
ファイル: test_friend.py プロジェクト: nomadsummer/cs198mojo
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
コード例 #3
0
ファイル: test_friend.py プロジェクト: Devristo/tribler
 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)
コード例 #4
0
ファイル: test_friend.py プロジェクト: Devristo/tribler
 def xxtest_normal(self):
     flist = ExternalFriendList()
     flist.updateFriendList()
     friends = flist.getFriends()
     print friends
コード例 #5
0
ファイル: test_friend.py プロジェクト: nomadsummer/cs198mojo
 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)
コード例 #6
0
ファイル: test_friend.py プロジェクト: nomadsummer/cs198mojo
 def xxtest_normal(self):
     flist = ExternalFriendList()
     flist.updateFriendList()
     friends = flist.getFriends()
     print friends