diff --git a/.travis.yml b/.travis.yml index f0b3086..3f47794 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ language: python python: - "2.7" + - "3.4" + - "3.5" + - "3.6" before_install: - "pip install --upgrade pip wheel" diff --git a/rest_framework_httpsignature/authentication.py b/rest_framework_httpsignature/authentication.py index 5e31600..0386b73 100644 --- a/rest_framework_httpsignature/authentication.py +++ b/rest_framework_httpsignature/authentication.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + from rest_framework import authentication from rest_framework import exceptions from httpsig import HeaderSigner diff --git a/rest_framework_httpsignature/tests.py b/rest_framework_httpsignature/tests.py index e2eda6e..9baa529 100644 --- a/rest_framework_httpsignature/tests.py +++ b/rest_framework_httpsignature/tests.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + from django.test import SimpleTestCase, TestCase, RequestFactory from django.contrib.auth import get_user_model from rest_framework_httpsignature.authentication import SignatureAuthentication @@ -137,7 +139,7 @@ def test_build_signature(self): signature_string = self.auth.build_signature( self.KEYID, SECRET, req) signature = re.match( - '.*signature="(.+)",?.*', signature_string).group(1) + r'.*signature="(.*?)",?.*', signature_string).group(1) self.assertEqual(expected_signature, signature) diff --git a/setup.py b/setup.py index 3bdd684..8748b99 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,13 @@ 'Environment :: Web Environment', 'Framework :: Django', 'Operating System :: OS Independent', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: Implementation :: CPython', 'License :: OSI Approved :: MIT License', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Security', diff --git a/test_settings.py b/test_settings.py index deb178e..c0d9d7d 100644 --- a/test_settings.py +++ b/test_settings.py @@ -12,6 +12,4 @@ 'rest_framework_httpsignature', ) -ROOT_URLCONF = 'rest_framework_httpsignature.tests' - SECRET_KEY = 'MY PRIVATE SECRET'