Commit 038fd1bf authored by Łukasz Nowak's avatar Łukasz Nowak

Start switching of testing the new way.

parent 94ffd313
...@@ -112,11 +112,6 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin): ...@@ -112,11 +112,6 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
finally: finally:
self.changeSkin(current_skin) self.changeSkin(current_skin)
def stepCallUpdateStatusOnPlannedPayment(self, sequence, **kw):
sequence['payment'] = self.portal.portal_catalog.getResultValue(
portal_type="Payment Transaction", simulation_state="planned")
sequence['payment'].PaymentTransaction_updateStatus()
def test_AccountingTransaction_startPayment(self): def test_AccountingTransaction_startPayment(self):
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.register_new_user_sequence_string + '\ sequence_string = self.register_new_user_sequence_string + '\
...@@ -131,28 +126,34 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin): ...@@ -131,28 +126,34 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepCheckPlannedUnknownPayment(self, sequence): def stepFetchStartedPayment(self, sequence, **kw):
self.assertEqual(sequence['payment'].getSimulationState(), 'planned') sequence['payment'] = self.portal.portal_catalog.getResultValue(
self.assertEqual(self.portal.portal_catalog.countResults(portal_type='Payzen Event', portal_type="Payment Transaction", simulation_state="started")
default_destination_uid=sequence['payment'].getUid(),
def stepCheckUnknownPayment(self, sequence):
self.assertEqual(sequence['payment'].getSimulationState(), 'started')
self.assertEqual(self.portal.portal_catalog.countResults(
portal_type='Payzen Event', default_destination_uid=sequence['payment']\
.getUid(),
limit=1)[0][0], 0) limit=1)[0][0], 0)
def test_PaymentTransaction_updateStatus_planned_unknown(self): def test_PaymentTransaction_updateStatus_planned_unknown(self):
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.register_new_user_sequence_string + '\ sequence_string = self.register_new_user_sequence_string + '\
LoginWebUser \ LoginWebUser \
CallUpdateStatusOnPlannedPayment \ FetchStartedPayment \
Tic \ Logout \
LoginERP5TypeTestCase\
CheckUnknownPayment \
Logout \ Logout \
LoginERP5TypeTestCase \
CheckPlannedUnknownPayment \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepCheckPlannedRegisteredPayment(self, sequence): def stepCheckPlannedRegisteredPayment(self, sequence):
self.assertEqual(sequence['payment'].getSimulationState(), 'confirmed') self.assertEqual(sequence['payment'].getSimulationState(), 'started')
self.assertEqual(self.portal.portal_catalog.countResults(portal_type='Payzen Event', self.assertEqual(self.portal.portal_catalog.countResults(
portal_type='Payzen Event',
default_destination_uid=sequence['payment'].getUid(), default_destination_uid=sequence['payment'].getUid(),
limit=3)[0][0], 2) limit=3)[0][0], 2)
raise NotImplementedError('Not finished checks.') raise NotImplementedError('Not finished checks.')
...@@ -170,11 +171,11 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin): ...@@ -170,11 +171,11 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
CheckRelatedSystemEvent \ CheckRelatedSystemEvent \
Logout \ Logout \
LoginWebUser \ LoginWebUser \
CallUpdateStatusOnPlannedPayment \ FetchStartedPayment \
CleanTic \ CleanTic \
Logout \ Logout \
LoginERP5TypeTestCase \ LoginERP5TypeTestCase \
CheckPlannedRegisteredPayment \ CheckRegisteredPayment \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
......
455 456
\ 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