Skip to content

Commit

Permalink
use uuid for job_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed Apr 16, 2020
1 parent 5269c69 commit 559c6ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dlp/jobs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import os
import uuid

import pytest
from retrying import retry
Expand All @@ -24,6 +25,7 @@
TEST_TABLE_PROJECT_ID = "bigquery-public-data"
TEST_DATASET_ID = "san_francisco"
TEST_TABLE_ID = "bikeshare_trips"
test_job_id = "test-job-{}".format(uuid.uuid4())


@pytest.fixture(scope="module")
Expand All @@ -46,7 +48,7 @@ def test_job_name():
},
}

response = dlp.create_dlp_job(parent, risk_job=risk_job)
response = dlp.create_dlp_job(parent, risk_job=risk_job, job_id=test_job_id)
full_path = response.name
# API expects only job name, not full project path
job_name = full_path[full_path.rfind("/") + 1:]
Expand Down

0 comments on commit 559c6ef

Please sign in to comment.