Page MenuHomePhabricator

Unit test MediaWiki communication works fine
Closed, ResolvedPublic

Description

Required skills

  • Basic Python knowledge.

Problem

Developers might break MediaWiki communication methods (defined in trackersite/tracker/models.py, MediaInfo class) unintentionally, which breaks Tracker unless an user notices the bug.

Proposed solution

Implement tests for MediaInfo.add_to_mediawiki, MediaInfo.remove_from_mediawiki and MediaInfo.store_mediawiki_data. You don't need to actually write anything into MediaWiki when tests are runned to consider this task completed, however, if you decide to do so, it will be taken into account when Wikimedia decides about the winners.

Student is expected to send a patch for wikimedia-cz/tracker repository, hosted at Wikimedia Gerrit. When claiming task on GCI website, student should claim a respective Phabricator task as well.

Materials

Details

Related Gerrit Patches:
wikimedia-cz/tracker : masterTest MediaWiki communication works fine

Event Timeline

Urbanecm created this task.May 11 2019, 8:40 PM
Urbanecm moved this task from Inbox to Ready (PM's approval not needed) on the WMCZ-Tracker board.
Urbanecm moved this task from Backlog to GCI on the User-Urbanecm board.Aug 25 2019, 11:59 PM
Urbanecm updated the task description. (Show Details)Aug 26 2019, 4:14 PM
Urbanecm updated the task description. (Show Details)Oct 12 2019, 4:56 PM
alcarazzam updated the task description. (Show Details)

Hi!
I don't understand well what I need to do to do this task.

  • If I sent requests to MediaWiki, it will update Wikimedia data, no?
  • What is supposed that I need to write into MediaWiki, so it will be taken into account when Wikimedia decides about the winners?

Regards

Hi, you can mock the methods with https://docs.python.org/3/library/unittest.mock.html, and assert the methods are called as expected.

Change 564773 had a related patch set uploaded (by Alcarazzam; owner: Alcarazzam):
[wikimedia-cz/tracker@master] Test MediaWiki communication works fine

https://gerrit.wikimedia.org/r/564773

Change 564773 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Test MediaWiki communication works fine

https://gerrit.wikimedia.org/r/564773

alcarazzam closed this task as Resolved.Jan 19 2020, 1:46 PM