[CLEAN] payment_acquirer_ogone: misc cleaning in module - test
bzr revid: tde@openerp.com-20131118111732-jdko48ebeylwqpyr
This commit is contained in:
@@ -49,7 +49,6 @@ class OgoneController(http.Controller):
|
||||
|
||||
res = Payment.ogone_form_feedback(cr, uid, post, context)
|
||||
print 'result after feedback', res
|
||||
# return ''
|
||||
return request.redirect(return_url)
|
||||
|
||||
@website.route([
|
||||
@@ -60,4 +59,6 @@ class OgoneController(http.Controller):
|
||||
def ogone_form_feedback_other(self, **post):
|
||||
cr, uid, context = request.cr, request.uid, request.context
|
||||
print 'Entering ogone_form_feedback_other', post
|
||||
return ''
|
||||
return_url = post.pop('return_url', '/')
|
||||
print 'return_url', return_url
|
||||
return request.redirect(return_url)
|
||||
|
||||
@@ -182,7 +182,6 @@ class OgonePayment(PaymentAcquirerCommon):
|
||||
|
||||
def test_30_ogone_s2s(self):
|
||||
test_ref = 'test_ref_%.15f' % time.time()
|
||||
print test_ref
|
||||
cr, uid, context = self.cr, self.uid, {}
|
||||
|
||||
# create a new draft tx
|
||||
@@ -197,19 +196,22 @@ class OgonePayment(PaymentAcquirerCommon):
|
||||
}, context=context
|
||||
)
|
||||
|
||||
# create an alias
|
||||
res = self.payment_transaction.ogone_s2s_create_alias(
|
||||
cr, uid, tx_id, {
|
||||
'expiry_date_mm': '01',
|
||||
'expiry_date_yy': '2015',
|
||||
'holder_name': 'Norbert Poilu',
|
||||
'number': '4000000000000006',
|
||||
'number': '4000000000000002',
|
||||
'brand': 'VISA',
|
||||
}, context=context)
|
||||
print res
|
||||
|
||||
print '--------------------'
|
||||
# check an alias is set, containing at least OPENERP
|
||||
tx = self.payment_transaction.browse(cr, uid, tx_id, context=context)
|
||||
self.assertIn('OPENERP', tx.partner_reference, 'ogone: wrong partner reference after creating an alias')
|
||||
|
||||
res = self.payment_transaction.ogone_s2s_execute(cr, uid, tx_id, {}, context=context)
|
||||
print res
|
||||
# print res
|
||||
|
||||
|
||||
# {
|
||||
|
||||
Reference in New Issue
Block a user