Page MenuHomePhabricator

update TestGetCommonsCatTemplates to mock _load_wikipedia_commonscat_templates()
Closed, ResolvedPublic


As per the comments in we can build a more stable version of the test if we mock the response from _load_wikipedia_commonscat_templates() (or whatever that function end up being called).

A patch for that would have to be built on top of where that function is introduced.

From the comments in
We need

  • A setup which provide a small dict,
  • A test of the load function which ensures that
    • The file is there
    • That the file contains at least the _default key

Event Timeline

Change 313760 had a related patch set uploaded (by Lokal Profil):
Re-factor test of getCommonscatTemplates

Change 313760 merged by jenkins-bot:
Re-factor test of getCommonscatTemplates

Lokal_Profil claimed this task.