Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace single quotes by double quotes in tests #33864

Merged
merged 3 commits into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/providers/google/cloud/hooks/test_mlengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_create_version(self, mock_get_conn):
operations.return_value.
get.return_value.
execute.return_value
) = {'name': operation_path, 'done': True}
) = {"name": operation_path, "done": True}
# fmt: on
create_version_response = self.hook.create_version(
project_id=project_id, model_name=model_name, version_spec=deepcopy(version)
Expand Down Expand Up @@ -134,7 +134,7 @@ def test_create_version_with_labels(self, mock_get_conn):
operations.return_value.
get.return_value.
execute.return_value
) = {'name': operation_path, 'done': True}
) = {"name": operation_path, "done": True}

create_version_response = self.hook.create_version(
project_id=project_id,
Expand Down Expand Up @@ -896,7 +896,7 @@ def test_create_version(self, mock_get_conn, mock_project_id):
operations.return_value.
get.return_value.
execute.return_value
) = {'name': operation_path, 'done': True}
) = {"name": operation_path, "done": True}
# fmt: on
create_version_response = self.hook.create_version(
model_name=model_name, version_spec=version, project_id=GCP_PROJECT_ID_HOOK_UNIT_TEST
Expand Down Expand Up @@ -1009,11 +1009,11 @@ def test_delete_version(self, mock_get_conn, mock_project_id):
model_name = "test-model"
version_name = "test-version"
# fmt: off
hussein-awala marked this conversation as resolved.
Show resolved Hide resolved
operation_path = f'projects/{GCP_PROJECT_ID_HOOK_UNIT_TEST}/operations/test-operation'
version_path = f'projects/{GCP_PROJECT_ID_HOOK_UNIT_TEST}/models/{model_name}/versions/{version_name}'
version = {'name': operation_path}
operation_not_done = {'name': operation_path, 'done': False}
operation_done = {'name': operation_path, 'done': True}
operation_path = f"projects/{GCP_PROJECT_ID_HOOK_UNIT_TEST}/operations/test-operation"
version_path = f"projects/{GCP_PROJECT_ID_HOOK_UNIT_TEST}/models/{model_name}/versions/{version_name}"
version = {"name": operation_path}
operation_not_done = {"name": operation_path, "done": False}
operation_done = {"name": operation_path, "done": True}

(
mock_get_conn.return_value.
Expand Down
4 changes: 2 additions & 2 deletions tests/providers/microsoft/azure/hooks/test_azure_cosmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_upsert_document_default(self, mock_cosmos):
.get_container_client
.return_value
.upsert_item
.return_value) = {'id': test_id}
.return_value) = {"id": test_id}
# fmt: on
Copy link
Contributor

@Taragolis Taragolis Aug 28, 2023

Choose a reason for hiding this comment

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

fmt: on / off it is a reason why this block not formatted by black

hook = AzureCosmosDBHook(azure_cosmos_conn_id="azure_cosmos_test_key_id")
returned_item = hook.upsert_document({"id": test_id})
Expand All @@ -141,7 +141,7 @@ def test_upsert_document(self, mock_cosmos):
.get_container_client
.return_value
.upsert_item
.return_value) = {'id': test_id}
.return_value) = {"id": test_id}
# fmt: on
hook = AzureCosmosDBHook(azure_cosmos_conn_id="azure_cosmos_test_key_id")
returned_item = hook.upsert_document(
Expand Down