aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-05-20Merge pull request #488 from dhermes/swap-to-utcnowNathaniel Manista
Replacing now() with utcnow() in device info code.
2016-05-16Added JWTAccessCredentials.Ken Payson
Newer Google APIs can accept JWTs signed using ServiceAccountCredentials for authentication. (See https://jwt.io/). The new behavior for GoogleCredentials.get_application_default() will attempt to use a signed JWT if ServiceAccountCredentials are available and no scope is specified. Upon specifying a scope, OAuth2 authentication will be used.
2016-04-08Hit 100% with branch coverageBill Prin
2016-04-08Get django_orm to 100% coverageBill Prin
2016-04-08100% coverage for oauth2client.contrib.multistore_fileJon Wayne Parrott
2016-04-07Replacing now() with utcnow() in device info code.Danny Hermes
2016-04-07Merge pull request #486 from dhermes/cover-client-v7Danny Hermes
Getting client.py to 100% coverage.
2016-04-07Merge pull request #478 from jonparrott/openersDanny Hermes
Move platform-specific openers to their own modules.
2016-04-06Getting client.py to 100% coverage.Danny Hermes
In particular: - `step1_get_device_and_user_codes` - `step2_exchange` with device info - Making explicit the `code=` argument in calls to `step2_exchange` in tests - `flow_from_clientsecrets` branches with revoke and device URI optional args
2016-04-06Adding test coverage for client.py.Danny Hermes
- `DeviceFlowInfo` (and using datetime now patch). - Corner cases for `step1_get_authorize_url` and `step2_exchange` - Failure cases for `flow_from_clientsecrets` - `verify_id_token` when the cached HTTP is used (i.e. the default argument)
2016-04-06Testing OAuth2Credentials._do_retrieve_scopes().Danny Hermes
2016-04-06Adding more branch coverage in client.py.Danny Hermes
- Rename `_RequireCryptoOrDie()` to `_require_crypto_or_die()` - Testing un-traversed GAE and GCE branches in `GoogleCredentials.get_application_default()` - Missing env. var. branch in `_get_environment_variable_file` - Missing APPDATA branch (on Windows) for `_get_well_known_file` - Renaming some of the long ADC test names - Adding test for `GoogleCredentials.get_application_default()` that actually uses the well-known file - Branch in `GoogleCredentials.from_stream()` when filename is False-y - Testing `_get_application_default_credential_GAE` and `_get_application_default_credential_GCE` (these just wrap circular imports at run time) - Testing `_require_crypto_or_die`
2016-04-06Adding tests for all branches of OAuth2Credentials._do_revoke.Danny Hermes
Also updating the `_do_refresh_request tests` to check the content sent.
2016-04-06Improving test branch coverage in client.py.Danny Hermes
Testing un-traversed branches in - `OAuth2Credentials._expires_in()` - `OAuth2Credentials.get_access_token()` - `OAuth2Credentials._do_refresh_request()`
2016-04-06Move platform-specific openers to their own modules.Jon Wayne Parrott
2016-04-06Adding test coverage for client.py module.Danny Hermes
- Replacing `_abstract()` with directly raising `NotImplementedError` - Testing all abstract code paths - Adding no-cover for a failed import - Completely testing the base `Credentials` class
2016-03-18Merge pull request #467 from jonparrott/coverage-locked-fileJon Wayne Parrott
Added tests for contrib.locked_file.
2016-03-17Added tests for contrib.locked_file.Jon Wayne Parrott
2016-03-16Merge pull request #462 from jonparrott/test-coverage-appengineJon Wayne Parrott
100% coverage for contrib.appengine
2016-03-16100% coverage for contrib.appengineJon Wayne Parrott
2016-03-16100% coverage for oauth2client.toolsJon Wayne Parrott
2016-03-14100% coverage for oauth2client.utilJon Wayne Parrott
2016-03-11Fix flask required decorator to redirect on expired credentials.Jon Wayne Parrott
2016-03-01Expand API for step2_exchangeEddie Warner
In python 3, the code received from the browser will be binary instead of a string. Expand the API for oauth_flow.step2_exchange(code) to allow this value to be passed as is rather than decoding. for example: credentials = self.flow.step2_exchange(b'some random code') test: tox -e py34 -- tests.test_client:OAuth2WebServerFlowTest.test_exchange_success_binary_code resolves: #443, #446
2016-02-24Move conditionally defined ndb helpers into their own module.Danny Hermes
Towards #433.
2016-02-22Merge pull request #429 from dhermes/move-dict-to-tupleDanny Hermes
Moving util.dict_to_tuple_key() into only module that uses it.
2016-02-22Merge pull request #421 from dhermes/sign-blob-all-svc-accountsDanny Hermes
Adding common sign_blob() service account types.
2016-02-22Moving util.dict_to_tuple_key() into only module that uses it.Danny Hermes
2016-02-22Adding common sign_blob() service account types.Danny Hermes
Also adding service_account_email() property.
2016-02-21Getting to 100% line coverage in tests.Danny Hermes
2016-02-20Removing all uses of self.fail().Danny Hermes
Replacing instead with assertRaises statements.
2016-02-19Merge pull request #419 from dhermes/fix-gce-acquire-2Danny Hermes
Stop sending scopes in token requests on GCE
2016-02-19Stop sending scopes in token requests on GCEDanny Hermes
Also check to warn a user when a scope is passed (since scopes have no effect for GCE service accounts).
2016-02-19Helpful error message in P12 factory in absence of pyOpenSSL.Danny Hermes
Fixes #417.
2016-02-19Merge pull request #411 from dhermes/fix-gce-acquireDanny Hermes
Fixing broken token acquire endpoint on GCE.
2016-02-19Implementing ServiceAccountCredentials.create_delegated().Danny Hermes
Fixes #418.
2016-02-19Fixing broken token acquire endpoint on GCE.Danny Hermes
2016-02-17Implement ServiceAccountCredentials.from_p12_keyfile_buffer().Danny Hermes
Fixes #412.
2016-02-17Merge pull request #410 from nathanielmanistaatgoogle/symbolic-constantNathaniel Manista
Use symbolic constant rather than literal value.
2016-02-16Use symbolic constant rather than literal valueNathaniel Manista
2016-02-16Cosmetic tweaksNathaniel Manista
Unnecessary (and embarrassingly out-of-date) shebang lines are dropped. License headers are trimmed to not have single-octothorpe lines above or below. The xsrfutil_test module doc string is trimmed of repeated information and placed properly after a blank line following the license header.
2016-02-09Merge pull request #387 from Galabar001/masterNathaniel Manista
Look at the v1 endpoint for the GCE metadata server.
2016-02-09Look at the v1 endpoint for the GCE metadata serverKevin Regan
We are updating all uses of the legacy GCE metadata server endpoints (0.1 and v1beta) to use the current endpoint.
2016-02-08Merge pull request #394 from ↵Nathaniel Manista
nathanielmanistaatgoogle/http-code-symbolic-constants Use symbolic constants rather than literal integer values for HTTP codes.
2016-02-05Merge pull request #368 from jay0lee/patch-2Nathaniel Manista
Updated Google URIs.
2016-02-05-Updated Google URIsJay Lee
GOOGLE_AUTH_URI update as documented at: https://developers.google.com/identity/protocols/OAuth2UserAgent#formingtheurl GOOGLE_TOKEN_URI update as documented at: https://developers.google.com/identity/protocols/OAuth2InstalledApp#handlingtheresponse GOOGLE_TOKEN_INFO_URI update as documented at: https://developers.google.com/identity/protocols/OAuth2UserAgent#tokeninfo-validation -update client_secrets.json with new URIs -update unfilled_client_secrets.json with new URIs
2016-02-05Removing SignedJwtAssertionCredentials.Danny Hermes
This completes the consolidation of the two service account credentials implementations. In the process, also adding test coverage for some untested code paths within the crypto helpers.
2016-02-05Implementing p12 support in ServiceAccountCredentials.Danny Hermes
2016-02-04Make _ServiceAccountCredentials public.Danny Hermes
Also - changing the svc. acct. creds constructor to take a signer - adding two factory constructors to build from a JSON keyfile (either by filename or already parsed) - adding helpers to avoid re-loading file contents or re-parsing JSON when constructing svc. acct. creds from the main `client` module
2016-02-04Removing novel crypto in service_account.py.Danny Hermes