diff options
author | mathieui <mathieui@mathieui.net> | 2020-12-05 17:37:50 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-12-05 17:37:50 +0100 |
commit | 73cc2a40082cf936221adb09cfe208bd06cd4b60 (patch) | |
tree | b6460caabba875c04bb5f680aa29954037b8ba09 /itests/test_basic_connect_and_message.py | |
parent | aa5d422f38889edf2131d840ca50e3fb8a603420 (diff) | |
parent | 77587a48432901b5a43441f3e41fe26c02aeb8ed (diff) | |
download | slixmpp-73cc2a40082cf936221adb09cfe208bd06cd4b60.tar.gz slixmpp-73cc2a40082cf936221adb09cfe208bd06cd4b60.tar.bz2 slixmpp-73cc2a40082cf936221adb09cfe208bd06cd4b60.tar.xz slixmpp-73cc2a40082cf936221adb09cfe208bd06cd4b60.zip |
Merge branch 'first-integration-tests' into 'master'
First integration tests
See merge request poezio/slixmpp!75
Diffstat (limited to 'itests/test_basic_connect_and_message.py')
-rw-r--r-- | itests/test_basic_connect_and_message.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/itests/test_basic_connect_and_message.py b/itests/test_basic_connect_and_message.py new file mode 100644 index 00000000..79ad37be --- /dev/null +++ b/itests/test_basic_connect_and_message.py @@ -0,0 +1,28 @@ +import unittest +from slixmpp.test.integration import SlixIntegration + + +class TestConnect(SlixIntegration): + async def asyncSetUp(self): + await super().asyncSetUp() + self.add_client( + self.envjid('CI_ACCOUNT1'), + self.envstr('CI_ACCOUNT1_PASSWORD'), + ) + self.add_client( + self.envjid('CI_ACCOUNT2'), + self.envstr('CI_ACCOUNT2_PASSWORD'), + ) + await self.connect_clients() + + async def test_send_message(self): + """Make sure we can send and receive messages""" + msg = self.clients[0].make_message( + mto=self.clients[1].boundjid, mbody='Msg body', + ) + msg.send() + message = await self.clients[1].wait_until('message') + self.assertEqual(message['body'], msg['body']) + + +suite = unittest.TestLoader().loadTestsFromTestCase(TestConnect) |