changeset 1182:bab76fc1ab45

Improve comment above assert line, and remove the Titanic-like verses from the assert statement that made it unsinkable :)
author Bilal Akhtar <bilalakhtar@ubuntu.com>
date Sat, 24 Dec 2011 20:13:45 -0500
parents e8fdcafe8cdd
children 50ff3067234a
files MoinMoin/items/_tests/test_Item.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/_tests/test_Item.py	Sat Dec 24 12:03:56 2011 -0500
+++ b/MoinMoin/items/_tests/test_Item.py	Sat Dec 24 20:13:45 2011 -0500
@@ -402,7 +402,10 @@
             from PIL import Image as PILImage
             result = TransformableBitmapImage._render_data_diff(item1, item.rev, item1.rev)
             # On Werkzeug 0.8.2+, urls with '+' are automatically encoded to '%2B'
-            assert [str(result).startswith('<img src="/+diffraw/image_Item?rev'),
+            # The assert statement works with both older and newer versions of Werkzeug
+            # Probably not an intentional change on the werkzeug side, see issue:
+            # https://github.com/mitsuhiko/werkzeug/issues/146
+            assert True in [str(result).startswith('<img src="/+diffraw/image_Item?rev'),
                     str(result).startswith('<img src="/%2Bdiffraw/image_Item?rev')]
         except ImportError:
             # no PIL