summaryrefslogtreecommitdiffstats
path: root/tests/test_paybox.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_paybox.py')
-rw-r--r--tests/test_paybox.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_paybox.py b/tests/test_paybox.py
index 6f09be1..ccb0848 100644
--- a/tests/test_paybox.py
+++ b/tests/test_paybox.py
@@ -146,13 +146,13 @@ class PayboxTests(TestCase):
'numero_appel': ['30310733'],
'reference': ['830657461681']
}
- backend_raw_response = """NUMTRANS=0013989865&NUMAPPEL=0030378572&NUMQUESTION=0013989862&SITE=1999888&RANG=32&AUTORISATION=XXXXXX&CODEREPONSE=00000&COMMENTAIRE=Demande traitée avec succès&REFABONNE=&PORTEUR="""
+ backend_raw_response = """NUMTRANS=0013989865&NUMAPPEL=0030378572&NUMQUESTION=0013989862&SITE=1999888&RANG=32&AUTORISATION=XXXXXX&CODEREPONSE=00000&COMMENTAIRE=Demande trait\xe9e avec succ\xe8s&REFABONNE=&PORTEUR="""
backend_expected_response = {"CODEREPONSE": "00000",
"RANG": "32",
"AUTORISATION": "XXXXXX",
"NUMTRANS": "0013989865",
"PORTEUR": "",
- "COMMENTAIRE": "Demande traitée avec succès",
+ "COMMENTAIRE": u"Demande traitée avec succès",
"SITE": "1999888",
"NUMAPPEL": "0030378572",
"REFABONNE": "",
@@ -192,7 +192,7 @@ class PayboxTests(TestCase):
self.assertEqual(requests_post.call_args[0][0], 'https://ppps.paybox.com/PPPS.php')
with mock.patch('eopayment.paybox.requests.post') as requests_post:
- error_response = """CODEREPONSE=00015&COMMENTAIRE=PAYBOX : Transaction non trouvée"""
+ error_response = """CODEREPONSE=00015&COMMENTAIRE=PAYBOX : Transaction non trouv\xe9e"""
response = mock.Mock(status_code=200, content=error_response)
requests_post.return_value = response
self.assertRaisesRegexp(eopayment.ResponseError, 'Transaction non trouvée', getattr(backend, operation_name),