summaryrefslogtreecommitdiff
path: root/addons/payment_authorize/tests/test_authorize.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-15 17:27:24 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commit481a00dc4b82bc1b2cbbd6079a147fe230ac57bd (patch)
tree975b178f4e4a3733b904bd511d905160014ec009 /addons/payment_authorize/tests/test_authorize.py
parent9d83784f1df18306b6166fd92a0573f39bf6262d (diff)
[FIX] P3: hash/hmac payload must be bytes
Diffstat (limited to 'addons/payment_authorize/tests/test_authorize.py')
-rw-r--r--addons/payment_authorize/tests/test_authorize.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment_authorize/tests/test_authorize.py b/addons/payment_authorize/tests/test_authorize.py
index 668e17d0562..6d3f4244583 100644
--- a/addons/payment_authorize/tests/test_authorize.py
+++ b/addons/payment_authorize/tests/test_authorize.py
@@ -39,7 +39,7 @@ class AuthorizeForm(AuthorizeCommon):
values['x_fp_timestamp'],
values['x_amount'],
]) + '^'
- return hmac.new(str(values['x_trans_key']), data, hashlib.md5).hexdigest()
+ return hmac.new(values['x_trans_key'].encode('utf-8'), data.encode('utf-8'), hashlib.md5).hexdigest()
def test_10_Authorize_form_render(self):
self.assertEqual(self.authorize.environment, 'test', 'test without test environment')