Changeset ee3bccd
- Timestamp:
- 2013-02-11T12:56:03Z (12 years ago)
- Branches:
- master
- Children:
- b56c76c
- Parents:
- 1146e21
- git-author:
- Mike Kazantsev <mk.fraggod@…> (11-02-13 12:56:03)
- git-committer:
- Miklos Vajna <vmiklos@…> (11-02-13 12:56:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/skype/test.py
r1146e21 ree3bccd 52 52 cwd = os.getcwd() 53 53 os.chdir("t/skyped") 54 shutil.copyfile("../../skyped.cnf", "skyped.cnf") 55 self.openssl(['req', '-new', '-x509', '-days', '365', '-nodes', '-config', 'skyped.cnf', '-out', 'skyped.cert.pem', '-keyout', 'skyped.key.pem']) 56 with open("skyped.conf", "w") as sock: 57 sock.write("[skyped]\n") 58 sock.write("username = alice\n") 59 sock.write("password = %s\n" % hashlib.sha1("foo").hexdigest()) 60 sock.write("cert = %s/skyped.cert.pem\n" % os.getcwd()) 61 sock.write("key = %s/skyped.key.pem\n" % os.getcwd()) 62 sock.write("port = 2727\n") 63 os.chdir(cwd) 54 try: 55 shutil.copyfile("../../skyped.cnf", "skyped.cnf") 56 self.openssl(['req', '-new', '-x509', '-days', '365', '-nodes', '-config', 'skyped.cnf', '-out', 'skyped.cert.pem', '-keyout', 'skyped.key.pem']) 57 with open("skyped.conf", "w") as sock: 58 sock.write("[skyped]\n") 59 sock.write("username = alice\n") 60 sock.write("password = %s\n" % hashlib.sha1("foo").hexdigest()) 61 sock.write("cert = %s/skyped.cert.pem\n" % os.getcwd()) 62 sock.write("key = %s/skyped.key.pem\n" % os.getcwd()) 63 sock.write("port = 2727\n") 64 finally: 65 os.chdir(cwd) 64 66 65 67 … … 72 74 def testInfo(self): 73 75 self.mock("info") 74 76 75 77 def testCall(self): 76 78 self.mock("call") 77 79 78 80 def testCallFailed(self): 79 81 self.mock("call-failed") 80 82 81 83 def testAddYes(self): 82 84 self.mock("add-yes") … … 90 92 def testGroupchatInvite(self): 91 93 self.mock("groupchat-invite") 92 94 93 95 def testCalledYes(self): 94 96 self.mock("called-yes")
Note: See TracChangeset
for help on using the changeset viewer.