Commit 904b9b0c authored by Yoshinori Okuji's avatar Yoshinori Okuji

In Zope 2.7, datetime in MySQL is not converted to DateTime automatically, so...

In Zope 2.7, datetime in MySQL is not converted to DateTime automatically, so we must do this explicitly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4573 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 61df26b3
...@@ -1473,6 +1473,8 @@ class TestInventory(TestOrderMixin,ERP5TypeTestCase): ...@@ -1473,6 +1473,8 @@ class TestInventory(TestOrderMixin,ERP5TypeTestCase):
next_date = simulation.getNextNegativeInventoryDate(resource=resource_value.getRelativeUrl(), next_date = simulation.getNextNegativeInventoryDate(resource=resource_value.getRelativeUrl(),
node = organisation_list[node].getRelativeUrl(), node = organisation_list[node].getRelativeUrl(),
variation_category = variation_categories) variation_category = variation_categories)
if type(next_date) == type(''):
next_date = DateTime(next_date)
next_date = next_date.strftime('%Y-%m-%d %H:%M:%S') next_date = next_date.strftime('%Y-%m-%d %H:%M:%S')
expected_negative_date = '%.4d-%.2d-%.2d %.2d:%.2d:%.2d' % (expected_negative_date.year(), expected_negative_date = '%.4d-%.2d-%.2d %.2d:%.2d:%.2d' % (expected_negative_date.year(),
expected_negative_date.month(), expected_negative_date.month(),
......
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