Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
ce1b6583
Commit
ce1b6583
authored
Feb 10, 2018
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e test that the last uuid is the same as the “last” value in the iq result
parent
99389eef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
tests/end_to_end/__main__.py
tests/end_to_end/__main__.py
+7
-5
No files found.
tests/end_to_end/__main__.py
View file @
ce1b6583
...
...
@@ -270,11 +270,13 @@ def send_stanza(stanza, xmpp, biboumi):
def
expect_stanza
(
xpaths
,
xmpp
,
biboumi
,
optional
=
False
,
after
=
None
):
replacements
=
common_replacements
replacements
.
update
(
xmpp
.
saved_values
)
check_func
=
check_xpath
if
not
optional
else
check_xpath_optional
if
isinstance
(
xpaths
,
str
):
xmpp
.
stanza_checker
=
partial
(
check_func
,
[
xpaths
.
format_map
(
common_
replacements
)],
xmpp
,
after
)
xmpp
.
stanza_checker
=
partial
(
check_func
,
[
xpaths
.
format_map
(
replacements
)],
xmpp
,
after
)
elif
isinstance
(
xpaths
,
tuple
):
xmpp
.
stanza_checker
=
partial
(
check_func
,
[
xpath
.
format_map
(
common_
replacements
)
for
xpath
in
xpaths
],
xmpp
,
after
)
xmpp
.
stanza_checker
=
partial
(
check_func
,
[
xpath
.
format_map
(
replacements
)
for
xpath
in
xpaths
],
xmpp
,
after
)
else
:
print
(
"Warning, from argument type passed to expect_stanza: %s"
%
(
type
(
xpaths
)))
...
...
@@ -2080,8 +2082,6 @@ if __name__ == '__main__':
partial
(
expect_stanza
,
"/presence[@type='unavailable']"
),
]),
Scenario
(
"mam_on_fixed_server"
,
[
handshake_sequence
(),
...
...
@@ -2154,11 +2154,13 @@ if __name__ == '__main__':
# and finally the message "99"
partial
(
expect_stanza
,
(
"/message/mam:result[@queryid='qid1']/forward:forwarded/delay:delay"
,
"/message/mam:result[@queryid='qid1']/forward:forwarded/client:message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/client:body[text()='100']"
)
"/message/mam:result[@queryid='qid1']/forward:forwarded/client:message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/client:body[text()='100']"
),
after
=
partial
(
save_value
,
"last_uuid"
,
partial
(
extract_attribute
,
"/message/mam:result"
,
"id"
))
),
# And it should not be marked as complete
partial
(
expect_stanza
,
(
"/iq[@type='result'][@id='id1'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']"
,
"/iq/mam:fin/rsm:set/rsm:last[text()='{last_uuid}']"
,
"!/iq//mam:fin[@complete='true']"
,
"/iq//mam:fin"
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment