Merge branch 'connect-basic-itests' into 'master'
tests: add basic reconnect/connect integration tests See merge request poezio/slixmpp!106
This commit is contained in:
commit
a381267d21
1 changed files with 25 additions and 0 deletions
25
itests/test_reconnect.py
Normal file
25
itests/test_reconnect.py
Normal file
|
@ -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)
|
Loading…
Reference in a new issue