From f7ac6123f63b68a23fe25f12febf46a8bc6de6d3 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Tue, 15 Jan 2008 13:10:32 +0000
Subject: [PATCH] Check getCreationDate on documents.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18716 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5OOo/tests/testDms.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/product/ERP5OOo/tests/testDms.py b/product/ERP5OOo/tests/testDms.py
index 4fdf7139f2..64a2007d98 100644
--- a/product/ERP5OOo/tests/testDms.py
+++ b/product/ERP5OOo/tests/testDms.py
@@ -458,6 +458,20 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
     self.assertEquals('attachment; filename="import_data_list.pdf"',
                       response.headers['content-disposition'])
 
+  def test_01_getCreationDate(self):
+    """
+    Check getCreationDate on all document type, as those documents 
+    are not associated to edit_workflow.
+    """
+    portal = self.getPortalObject()
+    for document_type in portal.getPortalDocumentTypeList():
+      module = portal.getDefaultModule(document_type)
+      obj = module.newContent(portal_type=document_type)
+      self.assertNotEquals(obj.getCreationDate(),
+                           module.getCreationDate())
+      self.assertNotEquals(obj.getCreationDate(),
+                           portal.CreationDate())
+
 
 def test_suite():
   suite = unittest.TestSuite()
-- 
2.30.9