diff options
Diffstat (limited to 'tests/test_stream_xep_0325.py')
-rw-r--r-- | tests/test_stream_xep_0325.py | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/tests/test_stream_xep_0325.py b/tests/test_stream_xep_0325.py index 2ebdd121..600bfa64 100644 --- a/tests/test_stream_xep_0325.py +++ b/tests/test_stream_xep_0325.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ - SleekXMPP: The Sleek XMPP Library + Slixmpp: The Slick XMPP Library Implementation of xeps for Internet of Things http://wiki.xmpp.org/web/Tech_pages/IoT_systems Copyright (C) 2013 Sustainable Innovation, Joachim.lindborg@sust.se, bjorn.westrom@consoden.se - This file is part of SleekXMPP. + This file is part of Slixmpp. See the file LICENSE for copying permission. """ @@ -14,12 +14,12 @@ import datetime import time import threading -from sleekxmpp.test import * -from sleekxmpp.xmlstream import ElementBase -from sleekxmpp.plugins.xep_0325.device import Device +from slixmpp.test import * +from slixmpp.xmlstream import ElementBase +from slixmpp.plugins.xep_0325.device import Device -class TestStreamControl(SleekTest): +class TestStreamControl(SlixTest): """ Test using the XEP-0325 plugin. @@ -189,7 +189,7 @@ class TestStreamControl(SleekTest): </message> """) - time.sleep(.5) + time.sleep(0.5) self.assertEqual(myDevice._get_field_value("Temperature"), "17") @@ -213,10 +213,8 @@ class TestStreamControl(SleekTest): </message> """) - time.sleep(.5) - - self.assertEqual(myDevice._get_field_value("Temperature"), "15") - self.assertFalse(myDevice.has_control_field("Voltage", "int")) + self.assertEqual(myDevice._get_field_value("Temperature"), "15"); + self.assertFalse(myDevice.has_control_field("Voltage", "int")); def testRequestSetOkAPI(self): @@ -259,9 +257,7 @@ class TestStreamControl(SleekTest): </iq> """) - time.sleep(.5) - - self.assertEqual(results, ["OK"]) + self.assertEqual(results, ["OK"]); def testRequestSetErrorAPI(self): @@ -305,8 +301,6 @@ class TestStreamControl(SleekTest): </iq> """) - time.sleep(.5) - self.assertEqual(results, ["OtherError"]) def testServiceDiscoveryClient(self): @@ -317,7 +311,7 @@ class TestStreamControl(SleekTest): self.recv(""" <iq type='get' from='master@clayster.com/amr' - to='tester@localhost' + to='tester@localhost/resource' id='disco1'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq> @@ -342,7 +336,7 @@ class TestStreamControl(SleekTest): self.recv(""" <iq type='get' from='master@clayster.com/amr' - to='tester@localhost' + to='tester@localhost/resource' id='disco1'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq> @@ -350,7 +344,7 @@ class TestStreamControl(SleekTest): self.send(""" <iq type='result' - from='tester@localhost' + from='tester@localhost/resource' to='master@clayster.com/amr' id='disco1'> <query xmlns='http://jabber.org/protocol/disco#info'> |