Commit 6786d79f authored by Łukasz Nowak's avatar Łukasz Nowak

Check system event related to payment.

parent 5e42950f
...@@ -14,6 +14,22 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin): ...@@ -14,6 +14,22 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
def unfakeSlapAuth(self): def unfakeSlapAuth(self):
pass pass
def stepCheckRelatedSystemEvent(self, sequence):
# use catalog to select exactly interesting events
# as there might be more because of running alarms
event = self.portal.portal_catalog(
portal_type='Payzen Event',
title='User navigation script for %s' % sequence['payment'].getTitle(),
limit=2)
self.assertEqual(1, len(event))
event = event[0]
self.assertEqual(event.getValidationState(), 'acknowledged')
message = event.objectValues()
self.assertEqual(1, len(message))
message = message[0]
self.assertEqual(message.getTitle(), 'Shown Page')
self.assertEqual(message.getTextContent(), sequence['payment_page'])
def stepCheckPaymentPage(self, sequence): def stepCheckPaymentPage(self, sequence):
callback = self.portal.web_site_module.hosting.payzen_callback callback = self.portal.web_site_module.hosting.payzen_callback
query = make_query(dict(transaction=sequence['payment'].getRelativeUrl())) query = make_query(dict(transaction=sequence['payment'].getRelativeUrl()))
...@@ -104,6 +120,7 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin): ...@@ -104,6 +120,7 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
LoginERP5TypeTestCase \ LoginERP5TypeTestCase \
CheckPaymentPage \ CheckPaymentPage \
Tic \ Tic \
CheckRelatedSystemEvent \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
......
449 450
\ 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