diff options
author | louiz’ <louiz@louiz.org> | 2016-04-22 11:55:08 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-04-22 11:57:58 +0200 |
commit | 439ea262237f6c33342bf62c05de7f305a63ff2b (patch) | |
tree | f31c7997cb4884875655addd4853998a0447e8cc /tests/end_to_end | |
parent | ea35a12d5b20c50a1405a6eed5149f44aee59a9f (diff) | |
download | biboumi-439ea262237f6c33342bf62c05de7f305a63ff2b.tar.gz biboumi-439ea262237f6c33342bf62c05de7f305a63ff2b.tar.bz2 biboumi-439ea262237f6c33342bf62c05de7f305a63ff2b.tar.xz biboumi-439ea262237f6c33342bf62c05de7f305a63ff2b.zip |
Add a basic fixed_server e2e scenario
Diffstat (limited to 'tests/end_to_end')
-rw-r--r-- | tests/end_to_end/__main__.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index c0c8542..ef8c7aa 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -260,11 +260,20 @@ confs = { """hostname=biboumi.localhost password=coucou db_name=biboumi.sqlite -port=8811"""} +port=8811""", + +'fixed_server': +"""hostname=biboumi.localhost +password=coucou +db_name=biboumi.sqlite +port=8811 +fixed_irc_server=irc.localhost +"""} common_replacements = { 'irc_server_one': 'irc.localhost@biboumi.localhost', 'irc_host_one': 'irc.localhost', + 'biboumi_host': 'biboumi.localhost', 'resource_one': 'resource1', 'nick_one': 'Nick', 'jid_one': 'first@example.com', @@ -431,6 +440,21 @@ if __name__ == '__main__': ), partial(expect_stanza, "/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/subject[text()='TOPIC TEST']"), ]), + Scenario("channel_basic_join_on_fixed_irc_server", + [ + handshake_sequence(), + partial(send_stanza, + "<presence from='{jid_one}/{resource_one}' to='#zgeg@{biboumi_host}/{nick_one}' />"), + connection_sequence("irc.localhost", '{jid_one}/{resource_one}'), + partial(expect_stanza, + "/message/body[text()='Mode #zgeg [+nt] by {irc_host_one}']"), + partial(expect_stanza, + ("/presence[@to='{jid_one}/{resource_one}'][@from='#zgeg@{biboumi_host}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", + "/presence/muc_user:x/muc_user:status[@code='110']") + ), + partial(expect_stanza, "/message[@from='#zgeg@{biboumi_host}'][@type='groupchat']/subject[not(text())]"), + ], conf='fixed_server' + ), ) failures = 0 |