http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11264
Revision: 11264 Author: legoktm Date: 2013-03-25 12:29:15 +0000 (Mon, 25 Mar 2013) Log Message: ----------- Fix interwiki_putfirst unittests, fix patrol tests after r11262.
Modified Paths: -------------- branches/rewrite/tests/site_tests.py
Modified: branches/rewrite/tests/site_tests.py =================================================================== --- branches/rewrite/tests/site_tests.py 2013-03-25 12:09:14 UTC (rev 11263) +++ branches/rewrite/tests/site_tests.py 2013-03-25 12:29:15 UTC (rev 11264) @@ -74,7 +74,8 @@ self.assertTrue(mysite.code in langs) obs = mysite.family.obsolete ipf = mysite.interwiki_putfirst() - self.assertType(ipf, list) + if ipf: #Not all languages use this + self.assertType(ipf, list)
for item in mysite.validLanguageLinks(): self.assertTrue(item in langs, item) @@ -663,10 +664,12 @@ self.assertTrue("redirect" not in change) for change in mysite.recentchanges(showPatrolled=True, total=5): self.assertType(change, dict) - self.assertTrue("patrolled" in change) + if mysite.has_right('patrol'): + self.assertTrue("patrolled" in change) for change in mysite.recentchanges(showPatrolled=False, total=5): self.assertType(change, dict) - self.assertTrue("patrolled" not in change) + if mysite.has_right('patrol'): + self.assertTrue("patrolled" not in change)
def testSearch(self): """Test the site.search() method"""
pywikipedia-svn@lists.wikimedia.org