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 renamed this task from Echo tests to Pywikibot Echo tests.Mar 7 2016, 5:17 AM
jayvdb updated the task description. (Show Details)

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

The automated test suite runs using the account [[https://en.wikipedia.org/wiki/User:Pywikibot-test|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.

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.

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 triaged this task as Low priority.

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

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