jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] aspects: Imply user on write tests
......................................................................
[FIX] aspects: Imply user on write tests
At the moment all writes require a user to be logged in but tests may not
define user and in that case the write test might fail because it's not working
on a logged in user. This sets user to True if it hasn't been set and is a
write test. So in case someone writes a write test without requiring a logged
in user it's necessary to explicitly set write to False now.
Change-Id: I4ef37ed6d9b28b72c0a1aa6be447818408c7107f
---
M tests/aspects.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py
index 8af9ade..df0a07c 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -763,6 +763,8 @@
bases = tuple([CheckHostnameMixin] + list(bases))
if 'write' in dct and dct['write']:
+ if 'user' not in dct:
+ dct['user'] = True
bases = tuple([SiteWriteMixin] + list(bases))
if ('user' in dct and dct['user']) or ('sysop' in dct and
dct['sysop']):
--
To view, visit
https://gerrit.wikimedia.org/r/226282
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4ef37ed6d9b28b72c0a1aa6be447818408c7107f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>