web/test/unittest_pdf.py
branch3.5
changeset 3259 2c5c1f434640
parent 3080 32c2b6a34ab2
child 4676 b0937a191f94
--- a/web/test/unittest_pdf.py	Wed Sep 16 16:40:20 2009 +0200
+++ b/web/test/unittest_pdf.py	Wed Sep 16 17:15:50 2009 +0200
@@ -31,4 +31,6 @@
         reference = open(osp.join(DATADIR, 'sample1.pdf'), 'r').read()
         output = pdftmp.read()
         # XXX almost equals due to ID, creation date, so it seems to fail
-        self.assertTextEquals(output, reference)
+        self.assertEquals( len(output), len(reference) )
+        # cut begin & end 'cause they contain variyng data
+        self.assertTextEquals(output[150:1500], reference[150:1500])