Skip to content

Commit 3b84c35

Browse files
authored
Update to use new subscribe() syntax (#1989)
* Update to use new subscribe() syntax * Missed two subscribe() call changes before * Cancel subscription when processed * Update risk.py * Fix waiting for message * Unneeded try/except removed
1 parent dc67b74 commit 3b84c35

File tree

5 files changed

+185
-255
lines changed

5 files changed

+185
-255
lines changed

dlp/jobs_test.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
@pytest.fixture(scope='session')
29-
def create_test_job():
29+
def test_job_name():
3030
import google.cloud.dlp
3131
dlp = google.cloud.dlp.DlpServiceClient()
3232

@@ -76,6 +76,5 @@ def test_list_dlp_jobs_with_job_type(capsys):
7676
assert 'Job: projects/' in out
7777

7878

79-
def test_delete_dlp_job(capsys):
80-
test_job_name = create_test_job()
79+
def test_delete_dlp_job(test_job_name, capsys):
8180
jobs.delete_dlp_job(GCLOUD_PROJECT, test_job_name)

dlp/quickstart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def quickstart(project_id):
5959
}
6060

6161
# Convert the project id into a full resource id.
62-
parent = dlp_client.project_path(project)
62+
parent = dlp_client.project_path(project_id)
6363

6464
# Call the API.
6565
response = dlp_client.inspect_content(parent, inspect_config, item)

dlp/quickstart_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_quickstart(capsys):
2929
google.cloud.dlp.DlpServiceClient,
3030
'project_path',
3131
return_value='projects/{}'.format(GCLOUD_PROJECT)):
32-
quickstart.quickstart()
32+
quickstart.quickstart(GCLOUD_PROJECT)
3333

3434
out, _ = capsys.readouterr()
3535
assert 'FIRST_NAME' in out

dlp/requirements.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
google-cloud-dlp==0.9.0
2-
google-cloud-storage==1.13.0
3-
google-cloud-pubsub==0.38.0
4-
google-cloud-datastore==1.7.1
5-
google-cloud-bigquery==1.7.0
1+
google-cloud-dlp==0.10.0
2+
google-cloud-storage==1.13.2
3+
google-cloud-pubsub==0.39.1
4+
google-cloud-datastore==1.7.3
5+
google-cloud-bigquery==1.8.1

0 commit comments

Comments
 (0)