コード例 #1
0
ファイル: commandTests.py プロジェクト: wyn/collab
    def test_getCommand(self):
        iq = self.iq
        cmd = Command(node='test', action='execute')
        iq.addChild(cmd.toElement())

        cmd2 = command.getCommand(iq)
        self.assertEquals(cmd2.toElement().toXml(), cmd.toElement().toXml())
コード例 #2
0
ファイル: pageManager.py プロジェクト: wyn/collab
 def cancel_page(self, iq, s):
     self.reset()
     response = xmlstream.toResponse(stanza=iq, stanzaType='result')
     cmd = getCommand(iq)
     cmd.status = 'canceled'
     response.addChild(cmd.toElement())
     return defer.succeed(response)
コード例 #3
0
ファイル: commandTests.py プロジェクト: wyn/collab
 def test_getCommand(self):
     iq = self.iq
     cmd2 = command.getCommand(iq)
     self.assertTrue(cmd2 is None)