Commit 0657413f authored by Romain Courteaud's avatar Romain Courteaud

Implementent test by following the description. And it is failing currently.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19300 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b7288a06
...@@ -331,12 +331,18 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -331,12 +331,18 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
""" """
if not run: return if not run: return
printAndLog('\nTest Automatic Setting Unique Reference') printAndLog('\nTest Automatic Setting Unique Reference')
raise NotImplementedError
# create three empty test documents # create three empty test documents
document1 = self.portal.document_module.newContent()
document2 = self.portal.document_module.newContent()
document3 = self.portal.document_module.newContent()
# run setUniqueReference on the second # run setUniqueReference on the second
document2.setUniqueReference()
# reference of the second doc should now be TEST-auto-2 # reference of the second doc should now be TEST-auto-2
self.assertEquals('TEST-auto-2', document2.getReference())
# run setUniqueReference('uniq') on the third # run setUniqueReference('uniq') on the third
document3.setUniqueReference('uniq')
# reference of the third doc should now be TEST-uniq-1 # reference of the third doc should now be TEST-uniq-1
self.assertEquals('TEST-uniq-1', document3.getReference())
def test_06_testExplicitRelations(self,quiet=QUIET,run=RUN_ALL_TEST): def test_06_testExplicitRelations(self,quiet=QUIET,run=RUN_ALL_TEST):
""" """
......
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