Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.4 #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage==4.0.3
flake8==2.5.4
nose==1.3.7
pycrypto==2.6.1
requests>=2.10.0
yanc==0.3.3
6 changes: 5 additions & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Test suite common infrastructure.
'''

import sys
import json

import requests
Expand All @@ -22,7 +23,10 @@

from inspect import stack, isfunction # NOQA

from mock import Mock # NOQA
if sys.version_info >= (3, 3):
from unittest.mock import Mock
else:
from mock import Mock # NOQA
from nose.tools import nottest # NOQA


Expand Down
8 changes: 6 additions & 2 deletions tests/test_service_oauth1.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@
from copy import deepcopy
from hashlib import sha1

from mock import patch

import rauth

import requests

import json
import pickle

import sys
if sys.version_info >= (3, 3):
from unittest.mock import patch
else:
from mock import patch


class OAuth1ServiceTestCase(RauthTestCase, RequestMixin, ServiceMixin,
HttpMixin):
Expand Down
7 changes: 6 additions & 1 deletion tests/test_service_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@
from rauth.compat import parse_qsl, is_basestring

from copy import deepcopy
from mock import patch

import requests

import json
import pickle

import sys
if sys.version_info >= (3, 3):
from unittest.mock import patch
else:
from mock import patch


class OAuth2ServiceTestCase(RauthTestCase, RequestMixin, ServiceMixin,
HttpMixin):
Expand Down
8 changes: 6 additions & 2 deletions tests/test_service_ofly.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
from datetime import datetime
from functools import wraps

from mock import patch

import requests

import pickle

import sys
if sys.version_info >= (3, 3):
from unittest.mock import patch
else:
from mock import patch


class OflyServiceTestCase(RauthTestCase, RequestMixin, ServiceMixin,
HttpMixin):
Expand Down
7 changes: 6 additions & 1 deletion tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
from base import RauthTestCase
from rauth.session import OAuth1Session, OAuth2Session, OflySession

from mock import patch

import requests

import json

import sys
if sys.version_info >= (3, 3):
from unittest.mock import patch
else:
from mock import patch


class RequestMixin(object):
def assert_ok(self, r):
Expand Down
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[tox]
envlist=py33,py27,py26,pypy
envlist=py34,py33,py27,py26,pypy

[testenv:py34]
deps=
-r{toxinidir}/[email protected]
commands=flake8 rauth tests
./run-tests.sh

[testenv:py33]
deps=
Expand Down