'test of request nodes stanza'

def testRequestNodes(self):

    iq = self.Iq()
    iq['type'] = 'get'
    iq['from'] = 'master@clayster.com/amr'
    iq['to'] = 'device@clayster.com'
    iq['id'] = '1'
    iq['req']['seqnr'] = '1'
    iq['req']['momentary'] = 'true'
    iq['req'].add_node('Device02', 'Source02', 'CacheType')
    iq['req'].add_node('Device44')
    self.check(iq, "\n                                                <iq    type='get'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='1'>\n                                                                <req    xmlns='urn:xmpp:iot:sensordata'    seqnr='1'    momentary='true'>\n                                                                                <node    nodeId='Device02'    sourceId='Source02'    cacheType='CacheType'/>\n                                                                                <node    nodeId='Device44'/>\n                                                                </req>\n                                                </iq>\n                                ")
    iq['req'].del_node('Device02')
    self.check(iq, "\n                                                <iq    type='get'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='1'>\n                                                                <req    xmlns='urn:xmpp:iot:sensordata'    seqnr='1'    momentary='true'>\n                                                                                <node    nodeId='Device44'/>\n                                                                </req>\n                                                </iq>\n                                ")
    iq['req'].del_nodes()
    self.check(iq, "\n                                                <iq    type='get'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='1'>\n                                                                <req    xmlns='urn:xmpp:iot:sensordata'    seqnr='1'    momentary='true'>\n                                                                </req>\n                                                </iq>\n                                ")
