Changeset 62:b98e610f62cc for wokkel/test/test_disco.py
- Timestamp:
- Jul 6, 2009, 9:24:58 AM (13 years ago)
- Branch:
- default
- Convert:
- svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@174
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/test/test_disco.py
r53 r62 515 515 516 516 517 def test_requestItemsFrom(self): 518 """ 519 A disco items request can be sent with an explicit sender address. 520 """ 521 d = self.protocol.requestItems(JID(u'example.org'), 522 sender=JID(u'test.example.org')) 523 524 iq = self.stub.output[-1] 525 self.assertEqual(u'test.example.org', iq.getAttribute(u'from')) 526 527 response = toResponse(iq, u'result') 528 query = response.addElement((NS_DISCO_ITEMS, u'query')) 529 self.stub.send(response) 530 531 return d 532 533 517 534 def test_requestInfo(self): 518 535 """ … … 550 567 551 568 self.stub.send(response) 569 return d 570 571 572 def test_requestInfoFrom(self): 573 """ 574 A disco info request can be sent with an explicit sender address. 575 """ 576 d = self.protocol.requestInfo(JID(u'example.org'), 577 sender=JID(u'test.example.org')) 578 579 iq = self.stub.output[-1] 580 print iq.toXml() 581 self.assertEqual(u'test.example.org', iq.getAttribute(u'from')) 582 583 response = toResponse(iq, u'result') 584 query = response.addElement((NS_DISCO_INFO, u'query')) 585 self.stub.send(response) 586 552 587 return d 553 588
Note: See TracChangeset
for help on using the changeset viewer.