Skip to content

Commit

Permalink
Fix typo of 'Only' as 'Onnly' (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott authored Sep 12, 2017
1 parent 4246832 commit 4460a96
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion google/auth/compute_engine/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from google.auth.compute_engine import _metadata


class Credentials(credentials.ReadOnnlyScoped, credentials.Credentials):
class Credentials(credentials.ReadOnlyScoped, credentials.Credentials):
"""Compute Engine Credentials.
These credentials use the Google Compute Engine metadata server to obtain
Expand Down
6 changes: 3 additions & 3 deletions google/auth/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def before_request(self, request, method, url, headers):


@six.add_metaclass(abc.ABCMeta)
class ReadOnnlyScoped(object):
class ReadOnlyScoped(object):
"""Interface for credentials whose scopes can be queried.
OAuth 2.0-based credentials allow limiting access using scopes as described
Expand Down Expand Up @@ -152,7 +152,7 @@ class ReadOnnlyScoped(object):
.. _RFC6749 Section 3.3: https://tools.ietf.org/html/rfc6749#section-3.3
"""
def __init__(self):
super(ReadOnnlyScoped, self).__init__()
super(ReadOnlyScoped, self).__init__()
self._scopes = None

@property
Expand All @@ -178,7 +178,7 @@ def has_scopes(self, scopes):
return set(scopes).issubset(set(self._scopes or []))


class Scoped(ReadOnnlyScoped):
class Scoped(ReadOnlyScoped):
"""Interface for credentials whose scopes can be replaced while copying.
OAuth 2.0-based credentials allow limiting access using scopes as described
Expand Down
12 changes: 6 additions & 6 deletions tests/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ def test_before_request():
assert headers['authorization'] == 'Bearer token'


class ReadOnnlyScopedCredentialsImpl(credentials.ReadOnnlyScoped,
CredentialsImpl):
class ReadOnlyScopedCredentialsImpl(
credentials.ReadOnlyScoped, CredentialsImpl):
@property
def requires_scopes(self):
return super(ReadOnnlyScopedCredentialsImpl, self).requires_scopes
return super(ReadOnlyScopedCredentialsImpl, self).requires_scopes


def test_readonly_scoped_credentials_constructor():
credentials = ReadOnnlyScopedCredentialsImpl()
credentials = ReadOnlyScopedCredentialsImpl()
assert credentials._scopes is None


def test_readonly_scoped_credentials_scopes():
credentials = ReadOnnlyScopedCredentialsImpl()
credentials = ReadOnlyScopedCredentialsImpl()
credentials._scopes = ['one', 'two']
assert credentials.scopes == ['one', 'two']
assert credentials.has_scopes(['one'])
Expand All @@ -100,7 +100,7 @@ def test_readonly_scoped_credentials_scopes():


def test_readonly_scoped_credentials_requires_scopes():
credentials = ReadOnnlyScopedCredentialsImpl()
credentials = ReadOnlyScopedCredentialsImpl()
assert not credentials.requires_scopes


Expand Down

0 comments on commit 4460a96

Please sign in to comment.