summaryrefslogtreecommitdiff
path: root/itests/test_reconnect.py
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@linkmauve.fr>2021-01-29 16:51:05 +0100
committerLink Mauve <linkmauve@linkmauve.fr>2021-01-29 16:51:05 +0100
commita381267d21ac9f5648b975d87663022047f10bba (patch)
tree2bdf50cfd5fad885c4e138c570e24df39886bd3b /itests/test_reconnect.py
parentdbcd0c6050f6c50c24ff1a86129a29133371373e (diff)
parent1e1576473b3b14357db1cf7a7b2707ade3bd6ab3 (diff)
downloadslixmpp-a381267d21ac9f5648b975d87663022047f10bba.tar.gz
slixmpp-a381267d21ac9f5648b975d87663022047f10bba.tar.bz2
slixmpp-a381267d21ac9f5648b975d87663022047f10bba.tar.xz
slixmpp-a381267d21ac9f5648b975d87663022047f10bba.zip
Merge branch 'connect-basic-itests' into 'master'
tests: add basic reconnect/connect integration tests See merge request poezio/slixmpp!106
Diffstat (limited to 'itests/test_reconnect.py')
-rw-r--r--itests/test_reconnect.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/itests/test_reconnect.py b/itests/test_reconnect.py
new file mode 100644
index 00000000..8318af64
--- /dev/null
+++ b/itests/test_reconnect.py
@@ -0,0 +1,25 @@
+import unittest
+from slixmpp.test.integration import SlixIntegration
+
+
+class TestReconnect(SlixIntegration):
+ async def asyncSetUp(self):
+ await super().asyncSetUp()
+ self.add_client(
+ self.envjid('CI_ACCOUNT1'),
+ self.envstr('CI_ACCOUNT1_PASSWORD'),
+ )
+ await self.connect_clients()
+
+ async def test_disconnect_connect(self):
+ """Check we can disconnect and connect again"""
+ await self.clients[0].disconnect()
+ self.clients[0].connect()
+ await self.clients[0].wait_until('session_start')
+
+ async def test_reconnect(self):
+ """Check we can reconnect()"""
+ self.clients[0].reconnect()
+ await self.clients[0].wait_until("session_start")
+
+suite = unittest.TestLoader().loadTestsFromTestCase(TestReconnect)