Page MenuHomePhabricator

Make erfgoedbot unittest run offline
Closed, ResolvedPublic

Description

It was discovered that several unittests actually end up connecting to live sites (due to initialisation of Pywikibot objects.

The tests should be improved to run fully offline

Event Timeline

Change #1251986 had a related patch set uploaded (by Lokal Profil; author: Lokal Profil):

[labs/tools/heritage@master] Mock pywikibot Site/Page in tests to allow offline execution

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

Change #1251986 merged by jenkins-bot:

[labs/tools/heritage@master] Mock pywikibot in tests and block network via pytest-socket

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

The merged patch mickes the Pywikibot features which connect to live sites and adds an additional block to prevent any future tests from being able to connect to the network