summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSerghei Mihai <smihai@entrouvert.com>2016-10-20 14:57:28 (GMT)
committerSerghei Mihai <smihai@entrouvert.com>2016-10-21 14:09:00 (GMT)
commitd6b80acd0241d31788abc9240ebc65b9f97e6335 (patch)
tree729ea7e828e9dd78a0d9abe04e79a84f01799626 /tests
parent14f3ad83891b0eed213de595ecbca8c731a69401 (diff)
downloadeopayment-d6b80acd0241d31788abc9240ebc65b9f97e6335.zip
eopayment-d6b80acd0241d31788abc9240ebc65b9f97e6335.tar.gz
eopayment-d6b80acd0241d31788abc9240ebc65b9f97e6335.tar.bz2
ogone: handle properly unicode params (#13592)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ogone.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/test_ogone.py b/tests/test_ogone.py
index 5108223..ba7e8d7 100644
--- a/tests/test_ogone.py
+++ b/tests/test_ogone.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
from unittest import TestCase
import urllib
@@ -5,13 +7,14 @@ import eopayment
import eopayment.ogone as ogone
from eopayment import ResponseError
-PSPID = '2352566'
+PSPID = u'2352566ö'
BACKEND_PARAMS = {
'environment': ogone.ENVIRONMENT_TEST,
'pspid': PSPID,
- 'sha_in': 'secret',
- 'sha_out': 'secret'
+ 'sha_in': u'sécret',
+ 'sha_out': u'sécret',
+ 'automatic_return_url': u'http://example.com/autömatic_réturn_url'
}
class OgoneTests(TestCase):
@@ -19,7 +22,7 @@ class OgoneTests(TestCase):
def test_request(self):
ogone_backend = eopayment.Payment('ogone', BACKEND_PARAMS)
amount = '42.42'
- order_id = 'myorder'
+ order_id = u'my ordér'
reference, kind, what = ogone_backend.request(amount=amount,
orderid=order_id, email='foo@example.com')
self.assertEqual(len(reference), 30)
@@ -30,7 +33,7 @@ class OgoneTests(TestCase):
self.assertEqual(root.attrib['method'], 'POST')
self.assertEqual(root.attrib['action'], ogone.ENVIRONMENT_TEST_URL)
values = {
- 'CURRENCY': 'EUR',
+ 'CURRENCY': u'EUR',
'ORDERID': reference,
'PSPID': PSPID,
'EMAIL': 'foo@example.com',