Commit 5489f5a6 authored by Jérome Perrin's avatar Jérome Perrin

raise exception explictly instead of using assert expressions



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9066 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74717e6d
...@@ -66,13 +66,6 @@ class TestListBox(ERP5TypeTestCase): ...@@ -66,13 +66,6 @@ class TestListBox(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
return "ListBox" return "ListBox"
def enableActivityTool(self):
"""
You can override this.
Return if we should create (1) or not (0) an activity tool.
"""
return 1
def afterSetUp(self): def afterSetUp(self):
self.login() self.login()
...@@ -170,8 +163,8 @@ class TestListBox(ERP5TypeTestCase): ...@@ -170,8 +163,8 @@ class TestListBox(ERP5TypeTestCase):
list_method_id, list_method_id,
'selection=None, sort_on=None, **kw', 'selection=None, sort_on=None, **kw',
r""" r"""
assert sort_on == [('title', 'ASC'), ('uid', 'ASC')],\ if sort_on != [('title', 'ASC'), ('uid', 'ASC')]:
'sort_on is %r' % sort_on raise AssertionError('sort_on is %r' % sort_on)
return [] return []
""") """)
...@@ -201,7 +194,9 @@ return [] ...@@ -201,7 +194,9 @@ return []
list_method_id, list_method_id,
'selection=None, dummy_default_param=None, **kw', 'selection=None, dummy_default_param=None, **kw',
""" """
assert dummy_default_param == 'dummy value' if dummy_default_param != 'dummy value':
raise AssertionError('recieved wrong arguments: %s instead of "dummy value"'
% dummy_default_param )
return [] return []
""") """)
......
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