'test of set request data stanzas'

def testSetRequestDatas(self):

    iq = self.Iq()
    iq['type'] = 'set'
    iq['from'] = 'master@clayster.com/amr'
    iq['to'] = 'device@clayster.com'
    iq['id'] = '1'
    iq['set'].add_node('Device02', 'Source02', 'MyCacheType')
    iq['set'].add_node('Device15')
    iq['set'].add_data('Tjohej', 'boolean', 'true')
    iq['set'].add_data('Tjohej2', 'boolean', 'false')
    iq['set'].add_data('TjohejC', 'color', 'FF00FF')
    iq['set'].add_data('TjohejC2', 'color', '00FF00')
    iq['set'].add_data('TjohejS', 'string', 'String1')
    iq['set'].add_data('TjohejS2', 'string', 'String2')
    iq['set'].add_data('TjohejDate', 'date', '2012-01-01')
    iq['set'].add_data('TjohejDate2', 'date', '1900-12-03')
    iq['set'].add_data('TjohejDateT4', 'dateTime', '1900-12-03    12:30')
    iq['set'].add_data('TjohejDateT2', 'dateTime', '1900-12-03    11:22')
    iq['set'].add_data('TjohejDouble2', 'double', '200.22')
    iq['set'].add_data('TjohejDouble3', 'double', '-12232131.3333')
    iq['set'].add_data('TjohejDur', 'duration', 'P5Y')
    iq['set'].add_data('TjohejDur2', 'duration', 'PT2M1S')
    iq['set'].add_data('TjohejInt', 'int', '1')
    iq['set'].add_data('TjohejInt2', 'int', '-42')
    iq['set'].add_data('TjohejLong', 'long', '123456789098')
    iq['set'].add_data('TjohejLong2', 'long', '-90983243827489374')
    iq['set'].add_data('TjohejTime', 'time', '23:59')
    iq['set'].add_data('TjohejTime2', 'time', '12:00')
    self.check(iq, "\n                                                <iq    type='set'\n                                                                from='master@clayster.com/amr'\n                                                                to='device@clayster.com'\n                                                                id='1'>\n                                                                <set    xmlns='urn:xmpp:iot:control'>\n                                                                                <node    nodeId='Device02'    sourceId='Source02'    cacheType='MyCacheType'/>\n                                                                                <node    nodeId='Device15'/>\n                                                                                <boolean    name='Tjohej'    value='true'/>\n                                                                                <boolean    name='Tjohej2'    value='false'/>\n                                                                                <color    name='TjohejC'    value='FF00FF'/>\n                                                                                <color    name='TjohejC2'    value='00FF00'/>\n                                                                                <string    name='TjohejS'    value='String1'/>\n                                                                                <string    name='TjohejS2'    value='String2'/>\n                                                                                <date    name='TjohejDate'    value='2012-01-01'/>\n                                                                                <date    name='TjohejDate2'    value='1900-12-03'/>\n                                                                                <dateTime    name='TjohejDateT4'    value='1900-12-03    12:30'/>\n                                                                                <dateTime    name='TjohejDateT2'    value='1900-12-03    11:22'/>\n                                                                                <double    name='TjohejDouble2'    value='200.22'/>\n                                                                                <double    name='TjohejDouble3'    value='-12232131.3333'/>\n                                                                                <duration    name='TjohejDur'    value='P5Y'/>\n                                                                                <duration    name='TjohejDur2'    value='PT2M1S'/>\n                                                                                <int    name='TjohejInt'    value='1'/>\n                                                                                <int    name='TjohejInt2'    value='-42'/>\n                                                                                <long    name='TjohejLong'    value='123456789098'/>\n                                                                                <long    name='TjohejLong2'    value='-90983243827489374'/>\n                                                                                <time    name='TjohejTime'    value='23:59'/>\n                                                                                <time    name='TjohejTime2'    value='12:00'/>\n                                                                </set>\n                                                </iq>\n                                ")
