Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #258 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
rayluo authored Jan 26, 2022
2 parents e5f662f + cc44e53 commit a1b9de8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion adal/authentication_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(
:param verify_ssl: (optional) requests verify. Either a boolean, in which case it
controls whether we verify the server's TLS certificate, or a string, in which
case it must be a path to a CA bundle to use. If this value is not provided, and
ADAL_PYTHON_SSL_NO_VERIFY env varaible is set, behavior is equivalent to
ADAL_PYTHON_SSL_NO_VERIFY env variable is set, behavior is equivalent to
verify_ssl=False.
:param proxies: (optional) requests proxies. Dictionary mapping protocol to the URL
of the proxy. See http://docs.python-requests.org/en/master/user/advanced/#proxies
Expand Down
2 changes: 1 addition & 1 deletion adal/cache_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from .constants import TokenResponseFields, Misc
from . import log

#surppress warnings: like accces to a protected member of "_AUTHORITY", etc
#surppress warnings: like access to a protected member of "_AUTHORITY", etc
# pylint: disable=W0212

def _create_token_hash(token):
Expand Down
2 changes: 1 addition & 1 deletion adal/oauth2_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _validate_device_code_response(self, body):
if not wire_response.get(OAuth2.DeviceCodeResponseParameters.USER_CODE):
raise AdalError('wire_response is missing user_code', wire_response)

#skip field naming tweak, becasue names from wire are python style already
#skip field naming tweak, because names from wire are python style already
return wire_response

def _handle_get_token_response(self, body):
Expand Down
4 changes: 2 additions & 2 deletions adal/wstrust_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def findall_content(xml_string, tag):
(https://www.w3.org/TR/xml-exc-c14n/), and void the SAML token signature.
SAML signature algo needs the "XML -> C14N(XML) -> Signed(C14N(Xml))" order.
The binary extention lxml is probably the canonical way to solve this
The binary extension lxml is probably the canonical way to solve this
(https://stackoverflow.com/questions/22959577/python-exclusive-xml-canonicalization-xml-exc-c14n)
but here we use this workaround, based on Regex, to return raw content as-is.
"""
Expand Down Expand Up @@ -140,7 +140,7 @@ def _parse_error(self):
error_found = True

# Subcode has minoccurs=0 and maxoccurs=1(default) according to the http://www.w3.org/2003/05/soap-envelope
# Subcode may have another subcode as well. This is only targetting at top level subcode.
# Subcode may have another subcode as well. This is only targeting at top level subcode.
# Subcode value may have different messages not always uses http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd.
# text inside the value is not possible to select without prefix, so substring is necessary
subnode = xmlutil.xpath_find(self._dom, 's:Body/s:Fault/s:Code/s:Subcode/s:Value')
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ reports=yes

# Python expression which should return a note less than 10 (10 is the highest
# note).You have access to the variables errors warning, statement which
# respectivly contain the number of errors / warnings messages and the total
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (R0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_authentication_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_create_from_header(self):
'Bearer authorization_uri=foobar,lkfj,;l,", resource="clark, &^()- q32,shark",fruitcake="f" a, f="foo"',
None
],
# Mispell Bearer
# Misspell Bearer
[
'Berer authorization_uri=foobar,lkfj,;l,", resource="clark, &^()- q32,shark",fruitcake="f" , f="foo"',
None
Expand Down
8 changes: 4 additions & 4 deletions tests/test_client_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_oauth_error(self):

@httpretty.activate
def test_error_with_junk_return(self):
junkResponse = 'This is not properly formated return value.'
junkResponse = 'This is not properly formatted return value.'

tokenRequest = util.setup_expected_client_cred_token_request_response(400, junkResponse)

Expand All @@ -96,7 +96,7 @@ def test_error_with_junk_return(self):

@httpretty.activate
def test_success_with_junk_return(self):
junkResponse = 'This is not properly formated return value.'
junkResponse = 'This is not properly formatted return value.'

tokenRequest = util.setup_expected_client_cred_token_request_response(200, junkResponse)

Expand All @@ -111,7 +111,7 @@ def test_no_cached_token_found_error(self):
try:
context.acquire_token(cp['resource'], 'unknownUser', cp['clientId'])
except Exception as err:
self.assertTrue(err, 'Expected an error and non was recieved.')
self.assertTrue(err, 'Expected an error and non was received.')
self.assertIn('not found', err.args[0], 'Returned error did not contain expected message: ' + err.args[0])


Expand Down Expand Up @@ -143,7 +143,7 @@ def reset_self_signed_jwt_stubs(safe_proto):
@httpretty.activate
def test_cert_happy_path(self):
''' TODO: Test Failing as of 2015/06/03 and needs to be completed. '''
self.fail("Not Yet Impelemented. Add Helper Functions and setup method")
self.fail("Not Yet Implemented. Add Helper Functions and setup method")
saveProto = updateSelfSignedJwtStubs()

responseOptions = { noRefresh : true }
Expand Down
4 changes: 2 additions & 2 deletions tests/test_username_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_federated_happy_path_and_correlation_id(self):

#assert
log_content = buffer.getvalue()
self.assertTrue(correlation_id in log_content, 'Logging was turned on but no messages were recieved.')
self.assertTrue(correlation_id in log_content, 'Logging was turned on but no messages were received.')

self.assertNotIn(cp['clientId'], log_content, "Should not log ClientID")
self.assertNotIn(
Expand Down Expand Up @@ -508,7 +508,7 @@ def test_jwt_cracking(self):
'notsupposedtobehere.eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiJlOTU4YzA5YS1hYzM3LTQ5MDAtYjRkNy1mYjNlZWFmNzMzOGQiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9jY2ViYTE0Yy02YTAwLTQ5YWMtYjgwNi04NGRlNTJiZjFkNDIvIiwiaWF0IjoxMzkxNjQ1NDU4LCJ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iRG5KZDFBQTRzZkNoQmJqZXJtcXQ2UV9aYTQiLCJmYW1pbHlfbmFtZSI6IlJhbmRhbGwiLCJnaXZlbl9uYW1lIjoiUmljaCJ9.foobar',
None
Expand Down

0 comments on commit a1b9de8

Please sign in to comment.