aboutsummaryrefslogtreecommitdiff
path: root/tests/test_file.py
diff options
context:
space:
mode:
authorPat Ferate <pferate+github@gmail.com>2014-07-16 14:21:37 -0700
committerPat Ferate <pferate+github@gmail.com>2014-07-16 14:21:37 -0700
commit718399bb7d4301f410b0792f32980b0363078e6a (patch)
tree126fb3e933df6320ba0ba2deaa160ae852e6f3f8 /tests/test_file.py
parent056ab9a6c3ec08ecfe3c90bc0ee87b8ce5bea5be (diff)
downloadoauth2client-718399bb7d4301f410b0792f32980b0363078e6a.tar.gz
Explicit relative imports, trying to use future_builtins.oct() for python2.x.
Diffstat (limited to 'tests/test_file.py')
-rw-r--r--tests/test_file.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_file.py b/tests/test_file.py
index a0ca8ee..83989ca 100644
--- a/tests/test_file.py
+++ b/tests/test_file.py
@@ -31,7 +31,7 @@ import stat
import tempfile
import unittest
-from http_mock import HttpMockSequence
+from .http_mock import HttpMockSequence
from oauth2client import GOOGLE_TOKEN_URI
from oauth2client import file
from oauth2client import locked_file
@@ -41,7 +41,11 @@ from oauth2client.anyjson import simplejson
from oauth2client.client import AccessTokenCredentials
from oauth2client.client import AssertionCredentials
from oauth2client.client import OAuth2Credentials
-from future_builtins import oct
+try:
+ # Python2
+ from future_builtins import oct
+except:
+ pass
FILENAME = tempfile.mktemp('oauth2client_test.data')
@@ -97,7 +101,7 @@ class OAuth2ClientFileTests(unittest.TestCase):
# Write a file with a pickled OAuth2Credentials.
credentials = self.create_test_credentials()
- f = open(FILENAME, 'w')
+ f = open(FILENAME, 'wb')
pickle.dump(credentials, f)
f.close()