[server] make `test_bfss_fs_importing_transparency` less verbose on failure
Dumping the whole content of a file on failure is a bit annoying. We only print
the bad version here (it's usually the file path).
--- a/server/test/unittest_storage.py Fri Nov 23 17:12:58 2012 +0100
+++ b/server/test/unittest_storage.py Tue Nov 27 12:36:33 2012 +0100
@@ -196,8 +196,11 @@
filepath = osp.abspath(__file__)
f1 = self.session.create_entity('File', data=Binary(filepath),
data_format=u'text/plain', data_name=u'foo')
- self.assertEqual(f1.data.getvalue(), file(filepath).read(),
- 'files content differ')
+ cw_value = f1.data.getvalue()
+ fs_value = file(filepath).read()
+ if cw_value != fs_value:
+ self.fail('cw value %r is different from file content' % cw_value)
+
@tag('update')
def test_bfss_update_with_existing_data(self):