'test of set response stanza'

def testSetResponse(self):

    iq = self.Iq()
    iq['type'] = 'result'
    iq['from'] = 'master@clayster.com/amr'
    iq['to'] = 'device@clayster.com'
    iq['id'] = '8'
    iq['setResponse']['responseCode'] = 'OK'
    self.check(iq, "\n                                                <iq    type='result'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='8'>\n                                                                <setResponse    xmlns='urn:xmpp:iot:control'    responseCode='OK'    />\n                                                </iq>\n                                ")
    iq = self.Iq()
    iq['type'] = 'error'
    iq['from'] = 'master@clayster.com/amr'
    iq['to'] = 'device@clayster.com'
    iq['id'] = '9'
    iq['setResponse']['responseCode'] = 'OtherError'
    iq['setResponse']['error']['var'] = 'Output'
    iq['setResponse']['error']['text'] = 'Test    of    other    error.!'
    self.check(iq, "\n                                                <iq    type='error'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='9'>\n                                                                <setResponse    xmlns='urn:xmpp:iot:control'    responseCode='OtherError'>\n                                                                                <error    var='Output'>Test    of    other    error.!</error>\n                                                                </setResponse>\n                                                </iq>\n                                ")
    iq = self.Iq()
    iq['type'] = 'error'
    iq['from'] = 'master@clayster.com/amr'
    iq['to'] = 'device@clayster.com'
    iq['id'] = '9'
    iq['setResponse']['responseCode'] = 'NotFound'
    iq['setResponse'].add_node('Device17', 'Source09')
    iq['setResponse'].add_node('Device18', 'Source09')
    iq['setResponse'].add_data('Tjohopp')
    self.check(iq, "\n                                                <iq    type='error'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='9'>\n                                                                <setResponse    xmlns='urn:xmpp:iot:control'    responseCode='NotFound'>\n                                                                                <node    nodeId='Device17'    sourceId='Source09'/>\n                                                                                <node    nodeId='Device18'    sourceId='Source09'/>\n                                                                                <parameter    name='Tjohopp'    />\n                                                                </setResponse>\n                                                </iq>\n                                ")
