Steps to replicate the issue (include links if applicable):
- Merge a patch :)
What happens?:
- Post-merge build fails
What should have happened instead?:
- Post-merge build should succeed :)
Other information (browser name/version, screenshots, etc.):
This test is failing. Example output log for https://gerrit.wikimedia.org/r/c/pywikibot/core/+/990720 is shown below:
... 11:01:43 ====================================================================== 11:01:43 ERROR: test_edit_claims (tests.file_tests.TestMediaInfoReadonlyEditing) 11:01:43 Test claim editing without writing rights. 11:01:43 ---------------------------------------------------------------------- 11:01:43 Traceback (most recent call last): 11:01:43 File "/src/pywikibot/login.py", line 102, in __init__ 11:01:43 user = code_to_usr.get(site.code) or code_to_usr['*'] 11:01:43 KeyError: '*' 11:01:43 11:01:43 During handling of the above exception, another exception occurred: 11:01:43 11:01:43 Traceback (most recent call last): 11:01:43 File "/src/tests/file_tests.py", line 533, in test_edit_claims 11:01:43 item.addClaim(new_claim) 11:01:43 File "/src/pywikibot/page/_wikibase.py", line 533, in addClaim 11:01:43 self.repo.addClaim(self, claim, bot=bot, **kwargs) 11:01:43 File "/src/pywikibot/site/_decorators.py", line 86, in callee 11:01:43 return fn(self, *args, **kwargs) 11:01:43 File "/src/pywikibot/site/_datasite.py", line 344, in addClaim 11:01:43 'token': self.tokens['csrf'], 11:01:43 File "/src/pywikibot/site/_tokenwallet.py", line 39, in __getitem__ 11:01:43 self.site.login() 11:01:43 File "/src/pywikibot/site/_apisite.py", line 432, in login 11:01:43 user=self.username()) 11:01:43 File "/src/pywikibot/login.py", line 110, in __init__ 11:01:43 "'myUsername'".format(site=site)) 11:01:43 pywikibot.exceptions.NoUsernameError: ERROR: username for commons:beta is undefined. 11:01:43 If you have a username for that site, please add a line to user config file (user_config.py) as follows: 11:01:43 usernames['commons']['beta'] = 'myUsername'