diff options
author | louiz’ <louiz@louiz.org> | 2016-10-21 01:05:38 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-10-21 01:05:38 +0200 |
commit | 82a6fa6d098c82914ff8a6ed44398eb0cf8c4d9a (patch) | |
tree | 7ca1e6c2660ad51dd0206643bbf99600fedc7332 /tests | |
parent | a4d67ce041f50e0d25e2b47d04cc25bdad86a048 (diff) | |
download | biboumi-82a6fa6d098c82914ff8a6ed44398eb0cf8c4d9a.tar.gz biboumi-82a6fa6d098c82914ff8a6ed44398eb0cf8c4d9a.tar.bz2 biboumi-82a6fa6d098c82914ff8a6ed44398eb0cf8c4d9a.tar.xz biboumi-82a6fa6d098c82914ff8a6ed44398eb0cf8c4d9a.zip |
e2e: Fix some logic in check_list_of_xpath
Diffstat (limited to 'tests')
-rw-r--r-- | tests/end_to_end/__main__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index 4a42820..fedfa6a 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -151,14 +151,13 @@ def check_list_of_xpath(list_of_xpaths, xmpp, stanza): found = None for i, xpaths in enumerate(list_of_xpaths): if all_xpaths_match(stanza, xpaths): - found = i + found = True + list_of_xpaths.pop(i) break - if found is None: + if not found: raise StanzaError("Received stanza “%s” did not match any of the expected xpaths:\n%s" % (stanza, list_of_xpaths)) - list_of_xpaths.pop(i) - if list_of_xpaths: step = partial(expect_unordered_already_formatted, list_of_xpaths) xmpp.scenario.steps.insert(0, step) |