Skip to content

Commit

Permalink
Fix cover test.
Browse files Browse the repository at this point in the history
  • Loading branch information
clundin25 committed Jun 8, 2023
1 parent 5c36d44 commit c523ee9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test__default.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ def test_load_credentials_from_dict_non_dict_object():
assert excinfo.match(r"dict type was expected")


def test_load_credentials_from_dict_authorized_user():
credentials, project_id = _default.load_credentials_from_dict(
AUTHORIZED_USER_FILE_DATA
)
assert isinstance(credentials, google.oauth2.credentials.Credentials)
assert project_id is None


def test_load_credentials_from_file_invalid_json(tmpdir):
jsonfile = tmpdir.join("invalid.json")
jsonfile.write("{")
Expand Down

0 comments on commit c523ee9

Please sign in to comment.