changeset 1180:1c5a013b9ebd

Fix the three failing tests. 1) For the DummyItem failures, just add a dummy destroy_all_revisions function 2) For the image diff output difference, just use the escaped version of '+' in +diffraw
author Bilal Akhtar <bilalakhtar@ubuntu.com>
date Thu, 22 Dec 2011 19:23:52 -0500
parents dca962df5e93
children e8fdcafe8cdd
files MoinMoin/items/__init__.py MoinMoin/items/_tests/test_Item.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Wed Dec 21 20:08:13 2011 -0500
+++ b/MoinMoin/items/__init__.py	Thu Dec 22 19:23:52 2011 -0500
@@ -158,6 +158,8 @@
         self.name = name
     def list_revisions(self):
         return [] # same as an empty Item
+    def destroy_all_revisions(self):
+        return True
 
 
 class Item(object):
--- a/MoinMoin/items/_tests/test_Item.py	Wed Dec 21 20:08:13 2011 -0500
+++ b/MoinMoin/items/_tests/test_Item.py	Thu Dec 22 19:23:52 2011 -0500
@@ -401,7 +401,7 @@
         try:
             from PIL import Image as PILImage
             result = TransformableBitmapImage._render_data_diff(item1, item.rev, item1.rev)
-            assert str(result).startswith('<img src="/+diffraw/image_Item?rev')
+            assert str(result).startswith('<img src="/%2Bdiffraw/image_Item?rev')
         except ImportError:
             # no PIL
             pass