Skip to content

Commit

Permalink
test: update tests to reflect import change
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Fiedler <[email protected]>
  • Loading branch information
miketheman committed Sep 17, 2022
1 parent 195a6a6 commit 45dae0c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/unit/test_gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ def test_gcloud_bigquery_factory(monkeypatch):
def test_gcloud_gcs_factory(monkeypatch):
client = pretend.stub()

storage = pretend.stub(
Client=pretend.stub(
from_service_account_json=pretend.call_recorder(
lambda path, project: client
)
storage_Client = pretend.stub(
from_service_account_json=pretend.call_recorder(
lambda path, project: client
)
)
monkeypatch.setattr(gcloud, "storage", storage)
monkeypatch.setattr(gcloud, "storage_Client", storage_Client)

request = pretend.stub(
registry=pretend.stub(
Expand All @@ -64,7 +62,7 @@ def test_gcloud_gcs_factory(monkeypatch):
)

assert gcloud.gcloud_gcs_factory(None, request) is client
assert storage.Client.from_service_account_json.calls == [
assert storage_Client.from_service_account_json.calls == [
pretend.call("/the/path/to/gcloud.json", project="my-cool-project")
]

Expand Down

0 comments on commit 45dae0c

Please sign in to comment.