Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

TST: Add unit tests for pandas_gbq.auth.get_credentials().#184

Merged
tswast merged 2 commits into
googleapis:masterfrom
tswast:issue-49-auth-unit-tests
May 26, 2018
Merged

TST: Add unit tests for pandas_gbq.auth.get_credentials().#184
tswast merged 2 commits into
googleapis:masterfrom
tswast:issue-49-auth-unit-tests

Conversation

@tswast

@tswast tswast commented May 25, 2018

Copy link
Copy Markdown
Contributor

Tests (actual auth mocked out):

  • Using private key with contents.
  • Using private key with path.
  • Using default credentials.
  • Using cached user credentials.

Also, since I found it a little hard to debug the private key tests, update the error message with a little more information about what kind of credentials it thinks private_key is.

Closes #49

Tests (actual auth mocked out):
* Using private key with contents.
* Using private key with path.
* Using default credentials.
* Using cached user credentials.
@tswast tswast requested review from max-sixty and parthea May 25, 2018 23:12
@tswast

tswast commented May 25, 2018

Copy link
Copy Markdown
Contributor Author

Failing on Python 2.7. I'm investigating.

@tswast

tswast commented May 25, 2018

Copy link
Copy Markdown
Contributor Author

It's a mock issue. The Python 2.7 autospec seems to be getting confused by the use of a classmethod.

@max-sixty max-sixty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@tswast tswast merged commit e753cc4 into googleapis:master May 26, 2018
@tswast tswast deleted the issue-49-auth-unit-tests branch May 26, 2018 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants