[Erp5-report] r40348 luke - /erp5/trunk/products/ERP5OOo/tests/testDms.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Nov 18 11:12:17 CET 2010


Author: luke
Date: Thu Nov 18 11:12:15 2010
New Revision: 40348

URL: http://svn.erp5.org?rev=40348&view=rev
Log:
 - check that all workflow transitions are possible by default

Modified:
    erp5/trunk/products/ERP5OOo/tests/testDms.py

Modified: erp5/trunk/products/ERP5OOo/tests/testDms.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testDms.py?rev=40348&r1=40347&r2=40348&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] Thu Nov 18 11:12:15 2010
@@ -2217,6 +2217,100 @@ return 1
       self.assertEquals(len(subject_result), 1)
       self.assertEquals(subject_result[0].getPath(), document.getPath())
 
+  def _test_document_publication_workflow(self, portal_type, transition):
+    document = self.getDocumentModule().newContent(portal_type=portal_type)
+    self.portal.portal_workflow.doActionFor(document, transition)
+
+  def test_document_publication_workflow_Drawing_publish(self):
+    self._test_document_publication_workflow('Drawing', 'publish_action')
+    self._test_document_publication_workflow('Drawing',
+        'publish_alive_action')
+
+  def test_document_publication_workflow_Drawing_release(self):
+    self._test_document_publication_workflow('Drawing', 'release_action')
+    self._test_document_publication_workflow('Drawing',
+        'release_alive_action')
+
+  def test_document_publication_workflow_Drawing_share(self):
+    self._test_document_publication_workflow('Drawing', 'share_action')
+    self._test_document_publication_workflow('Drawing',
+        'share_alive_action')
+
+  def test_document_publication_workflow_File_publish(self):
+    self._test_document_publication_workflow('File', 'publish_action')
+    self._test_document_publication_workflow('File',
+        'publish_alive_action')
+
+  def test_document_publication_workflow_File_release(self):
+    self._test_document_publication_workflow('File', 'release_action')
+    self._test_document_publication_workflow('File',
+        'release_alive_action')
+
+  def test_document_publication_workflow_File_share(self):
+    self._test_document_publication_workflow('File', 'share_action')
+    self._test_document_publication_workflow('File',
+        'share_alive_action')
+
+  def test_document_publication_workflow_PDF_publish(self):
+    self._test_document_publication_workflow('PDF', 'publish_action')
+    self._test_document_publication_workflow('PDF',
+        'publish_alive_action')
+
+  def test_document_publication_workflow_PDF_release(self):
+    self._test_document_publication_workflow('PDF', 'release_action')
+    self._test_document_publication_workflow('PDF',
+        'release_alive_action')
+
+  def test_document_publication_workflow_PDF_share(self):
+    self._test_document_publication_workflow('PDF', 'share_action')
+    self._test_document_publication_workflow('PDF',
+        'share_alive_action')
+
+  def test_document_publication_workflow_Presentation_publish(self):
+    self._test_document_publication_workflow('Presentation', 'publish_action')
+    self._test_document_publication_workflow('Presentation',
+        'publish_alive_action')
+
+  def test_document_publication_workflow_Presentation_release(self):
+    self._test_document_publication_workflow('Presentation', 'release_action')
+    self._test_document_publication_workflow('Presentation',
+        'release_alive_action')
+
+  def test_document_publication_workflow_Presentation_share(self):
+    self._test_document_publication_workflow('Presentation', 'share_action')
+    self._test_document_publication_workflow('Presentation',
+        'share_alive_action')
+
+  def test_document_publication_workflow_Spreadsheet_publish(self):
+    self._test_document_publication_workflow('Spreadsheet', 'publish_action')
+    self._test_document_publication_workflow('Spreadsheet',
+        'publish_alive_action')
+
+  def test_document_publication_workflow_Spreadsheet_release(self):
+    self._test_document_publication_workflow('Spreadsheet', 'release_action')
+    self._test_document_publication_workflow('Spreadsheet',
+        'release_alive_action')
+
+  def test_document_publication_workflow_Spreadsheet_share(self):
+    self._test_document_publication_workflow('Spreadsheet', 'share_action')
+    self._test_document_publication_workflow('Spreadsheet',
+        'share_alive_action')
+
+  def test_document_publication_workflow_Text_publish(self):
+    self._test_document_publication_workflow('Text', 'publish_action')
+    self._test_document_publication_workflow('Text',
+        'publish_alive_action')
+
+  def test_document_publication_workflow_Text_release(self):
+    self._test_document_publication_workflow('Text', 'release_action')
+    self._test_document_publication_workflow('Text',
+        'release_alive_action')
+
+  def test_document_publication_workflow_Text_share(self):
+    self._test_document_publication_workflow('Text', 'share_action')
+    self._test_document_publication_workflow('Text',
+        'share_alive_action')
+
 class TestDocumentWithSecurity(TestDocumentMixin):
 
   username = 'yusei'




More information about the Erp5-report mailing list