Commit 3299f278 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow implemnetation changes.

datetime.datetime is required, not Zope-ish DateTime.
there is no conversion in dict anymore.
parent 9cb63f8e
...@@ -135,15 +135,15 @@ class TestERP5PayzenSecurePayment(TestERP5PayzenSecurePaymentMixin): ...@@ -135,15 +135,15 @@ class TestERP5PayzenSecurePayment(TestERP5PayzenSecurePaymentMixin):
sha1('value1+value+' + self.service_password) sha1('value1+value+' + self.service_password)
) )
def test_getSignature_dict_date_as_DateTime(self): def test_getSignature_dict_date_as_datetime(self):
now = DateTime.DateTime() now = DateTime.DateTime().asdatetime()
d = {'key': now} d = {'key': now}
self.assertEqual( self.assertEqual(
self.service._getSignature(d, ['key']), self.service._getSignature(d, ['key']),
sha1(now.strftime('%Y%m%d') + '+' + self.service_password) sha1(now.strftime('%Y%m%d') + '+' + self.service_password)
) )
# dict was updated # dict was updated
self.assertEqual(d['key'], now.strftime('%Y-%m-%dT%H:%M:%S')) self.assertEqual(d['key'], now)
def test_getSignature_dict_date_as_string(self): def test_getSignature_dict_date_as_string(self):
now = DateTime.DateTime() now = DateTime.DateTime()
......
44 45
\ No newline at end of file \ No newline at end of file
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