0965e26c69430ef1a571abf360547002a4bbfa57,dlp/inspect_content_test.py,,test_inspect_gcs_file_with_custom_info_types,#Any#Any#Any#Any#,312

Before Change



    assert "Inspection operation started" in out
    // Cancel the operation
    operation_id = out.split("Inspection operation started: ")[1].split("\n")[0]
    print(operation_id)
    client = google.cloud.dlp_v2.DlpServiceClient()
    client.cancel_dlp_job(operation_id)


def test_inspect_gcs_file_no_results(bucket, topic_id, subscription_id, capsys):
    inspect_content.inspect_gcs_file(

After Change



def test_inspect_gcs_file_with_custom_info_types(
        bucket, topic_id, subscription_id, capsys):
    try:
        dictionaries = ["gary@somedomain.com"]
        regexes = ["\\(\\d{3}\\) \\d{3}-\\d{4}"]

        inspect_content.inspect_gcs_file(
            GCLOUD_PROJECT,
            bucket.name,
            "test.txt",
            topic_id,
            subscription_id,
            [],
            custom_dictionaries=dictionaries,
            custom_regexes=regexes,
            timeout=1)

        out, _ = capsys.readouterr()

        assert "Inspection operation started" in out
    finally:
        cancel_operation(out)


def test_inspect_gcs_file_no_results(
        bucket, topic_id, subscription_id, capsys):
    try:
        inspect_content.inspect_gcs_file(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 13

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 0965e26c69430ef1a571abf360547002a4bbfa57
Time: 2020-04-17
Author: tmatsuo@google.com
File Name: dlp/inspect_content_test.py
Class Name:
Method Name: test_inspect_gcs_file_with_custom_info_types


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 0965e26c69430ef1a571abf360547002a4bbfa57
Time: 2020-04-17
Author: tmatsuo@google.com
File Name: dlp/inspect_content_test.py
Class Name:
Method Name: test_inspect_gcs_file_no_results


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 0965e26c69430ef1a571abf360547002a4bbfa57
Time: 2020-04-17
Author: tmatsuo@google.com
File Name: dlp/inspect_content_test.py
Class Name:
Method Name: test_inspect_gcs_file


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 0965e26c69430ef1a571abf360547002a4bbfa57
Time: 2020-04-17
Author: tmatsuo@google.com
File Name: dlp/inspect_content_test.py
Class Name:
Method Name: test_inspect_gcs_multiple_files