Example #1
0
    def test_requestNotIQ(self):
        """
        The request stanza must be an iq.
        """
        stanza = generic.Stanza()
        stanza.stanzaKind = 'message'

        d = self.streamManager.request(stanza)
        self.assertFailure(d, ValueError)
Example #2
0
    def test_requestNotError(self):
        """
        The request stanza cannot be of type 'error'.
        """
        stanza = generic.Stanza()
        stanza.stanzaKind = 'iq'
        stanza.stanzaType = 'error'

        d = self.streamManager.request(stanza)
        self.assertFailure(d, ValueError)