Commit 2550aa0c authored by Rafael Monnerat's avatar Rafael Monnerat

Added a test For clone Bugs.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23794 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 86165e0f
......@@ -299,6 +299,15 @@ class TestBug(ERP5TypeTestCase):
self.assertEquals("#%s" % bug.getId(), bug.getReference())
#self.assertEquals(bug_message.getSourceTradeValue().getTitle(), 'dummy')
def stepCloneAndCheckBug(self, sequence=None, sequence_list=None, **kw):
"""
Create a dummy bug
"""
bug_to_clone = sequence.get('bug')
bug = bug_to_clone.Base_createCloneDocument(batch_mode=1)
self.assertEquals("#%s" % bug.getId(), bug.getReference())
#self.assertEquals(bug_message.getSourceTradeValue().getTitle(), 'dummy')
def stepOpenBug(self, sequence=None, sequence_list=None, **kw):
"""
Open the bug.
......@@ -484,6 +493,21 @@ class TestBug(ERP5TypeTestCase):
# sequence_list.addSequenceString(sequence_string)
# sequence_list.play(self, quiet=quiet)
def test_05_setCheckBugClone(self, quiet=QUIET, run=RUN_ALL_TEST):
"""
Test that a closed bug has its stop date property updated.
"""
if not run: return
sequence_list = SequenceList()
step_list = [ 'stepCreateBug',
'stepCheckBugInit',
'stepCloneAndCheckBug'
]
sequence_string = ' '.join(step_list)
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self, quiet=quiet)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestBug))
......
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