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

Make test exposing all errors.

parent 4e154687
...@@ -79,14 +79,16 @@ class TestVifibModuleSecurity(testVifibMixin): ...@@ -79,14 +79,16 @@ class TestVifibModuleSecurity(testVifibMixin):
portal = self.getPortal() portal = self.getPortal()
self.login(user_name='test_vifib_member') self.login(user_name='test_vifib_member')
error_list = []
for module_id in portal.objectIds(spec=('ERP5 Folder',)): for module_id in portal.objectIds(spec=('ERP5 Folder',)):
if module_id in self.used_module_id_list: if module_id in self.used_module_id_list:
try: try:
portal.restrictedTraverse(module_id) portal.restrictedTraverse(module_id)
except Unauthorized: except Unauthorized:
raise AssertionError, "User can not access '%s'" % module_id error_list.append("User can not access '%s'" % module_id)
else: else:
try: try:
self.assertRaises(Unauthorized, portal.restrictedTraverse, module_id) self.assertRaises(Unauthorized, portal.restrictedTraverse, module_id)
except AssertionError: 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 335
\ No newline at end of file \ 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