from twisted.internet.threads import deferToThread
from twisted.web.http import UNAUTHORIZED
-from oauth2client.client import SignedJwtAssertionCredentials
+try:
+ from oauth2client.client import SignedJwtAssertionCredentials
+ oauth2client_available = True
+except ImportError:
+ oauth2client_available = False
+ SignedJwtAssertionCredentials = None
from zope.interface import implements
unless noted otherwise.
"""
+ if not googlestorage_container.oauth2client_available:
+ skip = "Google Storage requires oauth2client"
+
def test_credentials(self):
"""
AuthenticationClient.get_authorization_header() initializes a
allmydata.storage.backends.cloud.googlestorage.googlestorage_container
unless noted otherwise.
"""
+ if not googlestorage_container.oauth2client_available:
+ skip = "Google Storage requires oauth2client"
+
class Response(object):
def __init__(self, code, headers={}):
self.code = code