Our unit test for article topic model is fetching outlinks for a predefined page and asserts those against a expected set of outlinks for this page.
However, the underlying page change in the meantime, which also changed the outlinks for the page as can be seen in the logs below:
async def test_get_outlinks(page_id, lang, expected):
with patch.object(OutlinksTopicModel, "load", return_value=True):
t = OutlinksTopicModel("model")
qids = await t.get_outlinks(page_id, lang)
> assert qids == expected
E AssertionError: assert {'Q100', 'Q10...0590158', ...} == {'Q100', 'Q10...0590158', ...}
E
E Extra items in the left set:
E 'Q7615342'
E 'Q506250'
E 'Q122999030'
E Extra items in the right set:
E 'Q1754'
E Use -v to get more diff
test/unit/outlink_topic_model/test_outlink_model.py:229: AssertionErrorTo fix it, we should update the predefined set of outlinks in our code.