| jayvdb added a comment. |
The test class TestOwnClient exists only to confirm that a data repository also works as a client.
It was created when Wikibase first added the ability for a data repository to also be a client. Prior to that, a Wikibase site could not be a Wikibase client.
Now, Wikibase sites are always a Wikibase client, and this test class is almost unnecessary. TestOwnClient uses the two wikidata repositories to check that our code doesnt get confused between client and repository modes on the same server.
TestOwnClient.test_item_not_exists and .test_own_repository were added in 8816913e43 to fix this task, however that is not helpful and should be reverted.
test_own_repository adds explicit coverage of data_repository() and bool is_data_repository, which is good and it is reasonable to include it in this test class.
However, there are already tests for item not existing, and many other strange cases, in TestItemLoad. Specifically test_fromPage_invalid_title, test_fromPage_redirect, test_fromPage_missing and test_fromPage_noitem, and tests those scenarios in much greater detail.
Cc: gerritbot, Aklapper, jayvdb, Zppix, Xqt, pywikibot-bugs-list, Lewizho99, Mdupont, Maathavan
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
