summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-12-29 08:57:29 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-12-29 08:57:29 (GMT)
commite8d556e5b24232691e192182ad873fe4fb652180 (patch)
treec76a7f8836992dd22e3fceeb8cd685c8bef08c43 /tests
parent6ebbb5aa9d7420adc14ef13900b30e02c238f758 (diff)
downloadeopayment-e8d556e5b24232691e192182ad873fe4fb652180.zip
eopayment-e8d556e5b24232691e192182ad873fe4fb652180.tar.gz
eopayment-e8d556e5b24232691e192182ad873fe4fb652180.tar.bz2
sips2: set statementReference with custom info or order id (#14454)v1.20
Diffstat (limited to 'tests')
-rw-r--r--tests/test_sips2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_sips2.py b/tests/test_sips2.py
index e2d77ba..a2250b4 100644
--- a/tests/test_sips2.py
+++ b/tests/test_sips2.py
@@ -9,6 +9,14 @@ def test_build_request():
data = [f for f in form.fields if f['name'] == 'Data']
assert not u'lix000000' in data[0]['value']
+ transaction, f, form = backend.request(amount=u'12')
+ data = [f for f in form.fields if f['name'] == 'Data']
+ assert 'statementReference=%s' % transaction in data[0]['value']
+
+ transaction, f, form = backend.request(amount=u'12', info1='foobar')
+ data = [f for f in form.fields if f['name'] == 'Data']
+ assert 'statementReference=foobar' in data[0]['value']
+
def test_options():
payment = eopayment.Payment('sips2', {'capture_mode': u'VALIDATION'})
assert payment.backend.get_data()['captureMode'] == 'VALIDATION'