summaryrefslogtreecommitdiff
path: root/tests/test_stanza_xep_0325.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-09-23 23:14:26 +0200
committermathieui <mathieui@mathieui.net>2015-10-02 19:00:19 +0200
commitacc52fd935b7e74919ad748f3a630596f66c62af (patch)
tree2d8988c57a63b9cec11c4bf03240a427df9632f8 /tests/test_stanza_xep_0325.py
parente42d651d7ed56375523f91076295fc5f388a8de0 (diff)
parent4305eddb4f634803423cd53d193125a63b00769a (diff)
downloadslixmpp-acc52fd935b7e74919ad748f3a630596f66c62af.tar.gz
slixmpp-acc52fd935b7e74919ad748f3a630596f66c62af.tar.bz2
slixmpp-acc52fd935b7e74919ad748f3a630596f66c62af.tar.xz
slixmpp-acc52fd935b7e74919ad748f3a630596f66c62af.zip
Merge branch 'develop' of https://github.com/fritzy/SleekXMPP into sleek-merge
Conflicts: README.rst examples/IoT_TestDevice.py examples/disco_browser.py setup.py sleekxmpp/jid.py sleekxmpp/plugins/google/auth/stanza.py sleekxmpp/plugins/google/gmail/notifications.py sleekxmpp/plugins/google/nosave/stanza.py sleekxmpp/plugins/google/settings/settings.py sleekxmpp/thirdparty/__init__.py sleekxmpp/thirdparty/socks.py sleekxmpp/thirdparty/statemachine.py sleekxmpp/util/__init__.py sleekxmpp/xmlstream/xmlstream.py slixmpp/basexmpp.py slixmpp/plugins/xep_0004/stanza/form.py slixmpp/plugins/xep_0009/rpc.py slixmpp/plugins/xep_0050/adhoc.py slixmpp/plugins/xep_0065/proxy.py slixmpp/plugins/xep_0084/stanza.py slixmpp/plugins/xep_0202/time.py slixmpp/plugins/xep_0323/sensordata.py slixmpp/plugins/xep_0325/control.py slixmpp/plugins/xep_0325/stanza/control.py slixmpp/roster/single.py slixmpp/stanza/atom.py slixmpp/stanza/rootstanza.py slixmpp/test/slixtest.py slixmpp/util/sasl/mechanisms.py slixmpp/version.py slixmpp/xmlstream/stanzabase.py tests/test_stanza_xep_0323.py tests/test_stanza_xep_0325.py tests/test_stream_xep_0323.py tests/test_stream_xep_0325.py
Diffstat (limited to 'tests/test_stanza_xep_0325.py')
-rw-r--r--tests/test_stanza_xep_0325.py75
1 files changed, 36 insertions, 39 deletions
diff --git a/tests/test_stanza_xep_0325.py b/tests/test_stanza_xep_0325.py
index 75a45907..3e388ac3 100644
--- a/tests/test_stanza_xep_0325.py
+++ b/tests/test_stanza_xep_0325.py
@@ -16,7 +16,6 @@ namespace='sn'
class TestControlStanzas(SlixTest):
-
def setUp(self):
pass
@@ -29,8 +28,8 @@ class TestControlStanzas(SlixTest):
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_node("Device02", "Source02", "MyCacheType")
+ iq['set'].add_node("Device15")
iq['set'].add_data("Tjohej", "boolean", "true")
self.check(iq,"""
@@ -47,7 +46,7 @@ class TestControlStanzas(SlixTest):
"""
)
- iq['set'].del_node("Device02");
+ iq['set'].del_node("Device02")
self.check(iq,"""
<iq type='set'
@@ -62,7 +61,7 @@ class TestControlStanzas(SlixTest):
"""
)
- iq['set'].del_nodes();
+ iq['set'].del_nodes()
self.check(iq,"""
<iq type='set'
@@ -84,8 +83,8 @@ class TestControlStanzas(SlixTest):
msg = self.Message()
msg['from'] = 'master@clayster.com/amr'
msg['to'] = 'device@clayster.com'
- msg['set'].add_node("Device02");
- msg['set'].add_node("Device15");
+ msg['set'].add_node("Device02")
+ msg['set'].add_node("Device15")
msg['set'].add_data("Tjohej", "boolean", "true")
self.check(msg,"""
@@ -111,7 +110,7 @@ class TestControlStanzas(SlixTest):
iq['from'] = 'master@clayster.com/amr'
iq['to'] = 'device@clayster.com'
iq['id'] = '8'
- iq['setResponse']['responseCode'] = "OK";
+ iq['setResponse']['responseCode'] = "OK"
self.check(iq,"""
<iq type='result'
@@ -128,10 +127,9 @@ class TestControlStanzas(SlixTest):
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.!";
-
+ iq['setResponse']['responseCode'] = "OtherError"
+ iq['setResponse']['error']['var'] = "Output"
+ iq['setResponse']['error']['text'] = "Test of other error.!"
self.check(iq,"""
<iq type='error'
@@ -150,11 +148,10 @@ class TestControlStanzas(SlixTest):
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");
-
+ iq['setResponse']['responseCode'] = "NotFound"
+ iq['setResponse'].add_node("Device17", "Source09")
+ iq['setResponse'].add_node("Device18", "Source09")
+ iq['setResponse'].add_data("Tjohopp")
self.check(iq,"""
<iq type='error'
@@ -179,38 +176,38 @@ class TestControlStanzas(SlixTest):
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_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("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("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("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("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("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("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("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("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("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");
+ iq['set'].add_data("TjohejTime", "time", "23:59")
+ iq['set'].add_data("TjohejTime2", "time", "12:00")
self.check(iq,"""
<iq type='set'