[Pywikipedia-l] SVN: [6066] branches/rewrite/pywikibot/tests/site_tests.py

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Wed Nov 5 22:10:51 UTC 2008


Revision: 6066
Author:   russblau
Date:     2008-11-05 22:10:51 +0000 (Wed, 05 Nov 2008)

Log Message:
-----------
fix bug in allimages test 

Modified Paths:
--------------
    branches/rewrite/pywikibot/tests/site_tests.py

Modified: branches/rewrite/pywikibot/tests/site_tests.py
===================================================================
--- branches/rewrite/pywikibot/tests/site_tests.py	2008-11-05 20:39:27 UTC (rev 6065)
+++ branches/rewrite/pywikibot/tests/site_tests.py	2008-11-05 22:10:51 UTC (rev 6066)
@@ -423,11 +423,11 @@
         for impage in mysite.allimages(minsize=100, limit=5):
             self.assertType(impage, pywikibot.ImagePage)
             self.assertTrue(mysite.page_exists(impage))
-            self.assertTrue(len(impage.text) >= 100)
-        for impage in mysite.allimages(maxsize=200, limit=5):
+            self.assertTrue(impage._imageinfo["size"] >= 100)
+        for impage in mysite.allimages(maxsize=2000, limit=5):
             self.assertType(impage, pywikibot.ImagePage)
             self.assertTrue(mysite.page_exists(impage))
-            self.assertTrue(len(impage.text) <= 200)
+            self.assertTrue(impage._imageinfo["size"] <= 2000)
 
     def testBlocks(self):
         """Test the site.blocks() method"""





More information about the Pywikipedia-l mailing list