Ejemplo n.º 1
0
 def testUserRemovedMe(self):
     self.client.factory.contacts = msn.MSNContactList()
     contact = msn.MSNContact(userHandle='*****@*****.**')
     contact.addToList(msn.REVERSE_LIST)
     self.client.factory.contacts.addContact(contact)
     self.client.lineReceived("REM 0 RL 100 [email protected]")
     self.failUnless(self.client.state == 'USERREMOVEDME', "Failed to remove user from reverse list")
Ejemplo n.º 2
0
 def testAsyncPhoneChange(self):
     c = msn.MSNContact(userHandle='*****@*****.**')
     self.client.factory.contacts = msn.MSNContactList()
     self.client.factory.contacts.addContact(c)
     self.client.makeConnection(StringTransport())
     self.client.lineReceived("BPR 101 [email protected] PHH 123%20456")
     c = self.client.factory.contacts.getContact('*****@*****.**')
     self.failUnless(self.client.state == 'GOTPHONE', "Did not fire phone change callback")
     self.failUnless(c.homePhone == '123 456', "Did not update the contact's phone number")
     self.failUnless(self.client.factory.contacts.version == 101, "Did not update list version")
Ejemplo n.º 3
0
 def testUserAddedMe(self):
     self.client.factory.contacts = msn.MSNContactList()
     self.client.lineReceived("ADD 0 RL 100 [email protected] Screen%20Name")
     self.failUnless(self.client.state == 'USERADDEDME', "Failed to add user to reverse lise")