Commit 0f14a7fe authored by Łukasz Nowak's avatar Łukasz Nowak

Make test exposing all errors.

parent 4e154687
......@@ -79,14 +79,16 @@ class TestVifibModuleSecurity(testVifibMixin):
portal = self.getPortal()
self.login(user_name='test_vifib_member')
error_list = []
for module_id in portal.objectIds(spec=('ERP5 Folder',)):
if module_id in self.used_module_id_list:
try:
portal.restrictedTraverse(module_id)
except Unauthorized:
raise AssertionError, "User can not access '%s'" % module_id
error_list.append("User can not access '%s'" % module_id)
else:
try:
self.assertRaises(Unauthorized, portal.restrictedTraverse, module_id)
except AssertionError:
raise AssertionError, "User can access '%s'" % module_id
error_list.append("User can access '%s'" % module_id)
self.assertEqual([], error_list, '\n'.join(error_list))
334
\ No newline at end of file
335
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment