jenkins-bot submitted this change.

View Change

Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[tests] take into account that test page is modified in meantime

Bug: T367006
Change-Id: I053c69438aedd5977fa438150f75e30c03f7e232
---
M tests/oauth_tests.py
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/oauth_tests.py b/tests/oauth_tests.py
index 6a7cc5e..a39c528 100755
--- a/tests/oauth_tests.py
+++ b/tests/oauth_tests.py
@@ -79,14 +79,17 @@
ts = str(time.time())
p = pywikibot.Page(self.site, title)
try:
- p.site.editpage(p, appendtext=ts)
+ p.site.editpage(p, appendtext='\n' + ts)
except EditConflictError as e:
self.assertEqual(e.page, p)
else:
revision_id = p.latest_revision_id
p = pywikibot.Page(self.site, title)
- self.assertEqual(revision_id, p.latest_revision_id)
- self.assertTrue(p.text.endswith(ts))
+ t = p.text
+ if revision_id == p.latest_revision_id:
+ self.assertTrue(p.text.endswith(ts))
+ else:
+ self.assertIn(ts, t)


class TestOauthLoginManger(DefaultSiteTestCase, OAuthSiteTestCase):

To view, visit change 1040812. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I053c69438aedd5977fa438150f75e30c03f7e232
Gerrit-Change-Number: 1040812
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged