diff --git a/samples/snippets/publisher.py b/samples/snippets/publisher.py index 2ecbfd2f0..1f40f764b 100644 --- a/samples/snippets/publisher.py +++ b/samples/snippets/publisher.py @@ -145,8 +145,7 @@ def update_topic_kinesis_ingestion( ) ), ), - update_mask=field_mask_pb2.FieldMask( - paths=["ingestion_data_source_settings"]), + update_mask=field_mask_pb2.FieldMask(paths=["ingestion_data_source_settings"]), ) topic = publisher.update_topic(request=update_request) @@ -535,7 +534,7 @@ def detach_subscription(project_id: str, subscription_id: str) -> None: create_topic_kinesis_ingestion_parser.add_argument("consumer_arn") create_topic_kinesis_ingestion_parser.add_argument("aws_role_arn") create_topic_kinesis_ingestion_parser.add_argument("gcp_service_account") - + update_topic_kinesis_ingestion_parser = subparsers.add_parser( "update_kinesis_ingestion", help=update_topic_kinesis_ingestion.__doc__ ) diff --git a/samples/snippets/publisher_test.py b/samples/snippets/publisher_test.py index e29dec65d..ac91ddb81 100644 --- a/samples/snippets/publisher_test.py +++ b/samples/snippets/publisher_test.py @@ -160,7 +160,8 @@ def test_create_kinesis_ingestion( # Clean up resource created for the test. publisher_client.delete_topic(request={"topic": topic_path}) - + + def test_update_kinesis_ingestion( publisher_client: pubsub_v1.PublisherClient, capsys: CaptureFixture[str] ) -> None: @@ -184,7 +185,7 @@ def test_update_kinesis_ingestion( out, _ = capsys.readouterr() assert f"Created topic: {topic_path}" in out - + publisher.update_topic_kinesis_ingestion( PROJECT_ID, TOPIC_ID, @@ -193,7 +194,7 @@ def test_update_kinesis_ingestion( aws_role_arn, gcp_service_account, ) - + out, _ = capsys.readouterr() assert f"Updated topic: {topic_path} with AWS Kinesis Ingestion Settings" in out