Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b84c35

Browse filesBrowse files
authored
Update to use new subscribe() syntax (GoogleCloudPlatform#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
Copy full SHA for 3b84c35

File tree

Expand file treeCollapse file tree

5 files changed

+185
-255
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+185
-255
lines changed

‎dlp/jobs_test.py

Copy file name to clipboardExpand all lines: dlp/jobs_test.py
+2-3Lines changed: 2 additions & 3 deletions
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

Copy file name to clipboardExpand all lines: dlp/quickstart.py
+1-1Lines changed: 1 addition & 1 deletion
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

Copy file name to clipboardExpand all lines: dlp/quickstart_test.py
+1-1Lines changed: 1 addition & 1 deletion
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

Copy file name to clipboard
+5-5Lines changed: 5 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.