From c6db5f7ff6c35e606bce092d8417b2a828c992fd Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Sat, 25 Jul 2015 23:05:24 -0400 Subject: [PATCH] Fix Python 3.2 compatibility with the help of six.u Update tox to test in Python 2.5 and above, now that those versions are all confirmed to work. --- tests/test_api_transaction.py | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_api_transaction.py b/tests/test_api_transaction.py index f18f743..e05d116 100644 --- a/tests/test_api_transaction.py +++ b/tests/test_api_transaction.py @@ -1,4 +1,4 @@ -from six import BytesIO +from six import BytesIO, u from datetime import date import mock @@ -100,7 +100,7 @@ def test_make_call(self, urlopen): @mock.patch('authorize.apis.transaction.urlopen') def test_make_call_with_unicode(self, urlopen): urlopen.side_effect = self.success - result = self.api._make_call({u'\xe3': '1', 'b': u'\xe3'}) + result = self.api._make_call({u('\xe3'): '1', 'b': u('\xe3')}) self.assertEqual(URL(urlopen.call_args[0][0]), URL('{0}?%C3%A3=1&b=%C3%A3'.format(TEST_URL))) self.assertEqual(result, PARSED_SUCCESS) diff --git a/tox.ini b/tox.ini index c8b0c39..deebb33 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py26,py27,py34 +envlist=py25,py26,py27,py31,py32,py33,py34 [testenv] deps = -rrequirements.txt passenv=AUTHORIZE_LIVE_TESTS