[Erp5-report] r12719 - /erp5/trunk/products/ERP5/tests/testBug.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 15 11:28:39 CET 2007


Author: kevin
Date: Thu Feb 15 11:28:36 2007
New Revision: 12719

URL: http://svn.erp5.org?rev=12719&view=rev
Log:
Declare file encoding to comply with PEP #0263 ( http://www.python.org/dev/peps/pep-0263/ ).
Compare dates only, not time.

Modified:
    erp5/trunk/products/ERP5/tests/testBug.py

Modified: erp5/trunk/products/ERP5/tests/testBug.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBug.py?rev=12719&r1=12718&r2=12719&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBug.py (original)
+++ erp5/trunk/products/ERP5/tests/testBug.py Thu Feb 15 11:28:36 2007
@@ -1,3 +1,5 @@
+# -*- coding: UTF-8 -*-
+
 ##############################################################################
 #
 # Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
@@ -186,7 +188,7 @@
     """
     bug = sequence.get('bug')
     bug.setStopDate(self.datetime - 10)
-    self.assertEquals(bug.getStopDate(), self.datetime - 10) # Check that datetime is fixed
+    self.assertEquals(bug.getStopDate().Date(), (self.datetime - 10).Date()) # Check that datetime is fixed
 
 
   def stepCheckClosedDate(self, sequence=None, sequence_list=None, **kw):
@@ -194,7 +196,7 @@
       Check that the closed date is set as today.
     """
     bug = sequence.get('bug')
-    self.assertEquals(bug.getStopDate(), self.datetime)
+    self.assertEquals(bug.getStopDate().Date(), self.datetime.Date())
 
 
 




More information about the Erp5-report mailing list