Page MenuHomePhabricator

Pywikibot Echo tests
Closed, ResolvedPublic

Description

Add tests for pywikibot.echo and pywikibot.site.APISite.notifications

Tests should be added to a new module tests/echo_tests.py

APISite.notifications provides kwargs. Some of the values which can be used in kwargs can be found at https://www.mediawiki.org/wiki/Notifications/API

Event Timeline

jayvdb created this task.Mar 7 2016, 5:15 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 7 2016, 5:15 AM
jayvdb renamed this task from Echo tests to Pywikibot Echo tests.Mar 7 2016, 5:17 AM
jayvdb updated the task description. (Show Details)
jayvdb added a comment.Mar 7 2016, 5:43 AM

The hard part with this will be setting up test data.

The automated test suite runs using the account Pywikibot-test, so we would need to set up data so that the Pywikibot-test account receives a notification. If we dont mark that notification as read, it should then be available for every test suite run.

jayvdb added a comment.Mar 7 2016, 5:44 AM

The easiest way to start this task is to create some dry tests, which create a Notification object using Notification.fromJSON with data being a hand-coded dict.

I would like to take this task up. :D
I'll start with dry tests, as suggested above.

darthbhyrava removed darthbhyrava as the assignee of this task.Mar 17 2016, 11:28 PM

Leaving this aside for later after @jayvdb's suggestion.

Change 482494 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] Add echo_tests.py

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

Xqt claimed this task.Jan 6 2019, 10:54 AM
Xqt triaged this task as Low priority.
Xqt moved this task from Backlog to Needs Review on the Pywikibot board.Feb 3 2019, 11:23 AM

Change 482494 merged by jenkins-bot:
[pywikibot/core@master] [tests] Add echo_tests.py

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

Xqt closed this task as Resolved.Feb 8 2019, 5:06 AM