From 4e34497335890cb34da4143b39603c8ab6e0431a Mon Sep 17 00:00:00 2001 From: Gal Zahavi <38544478+galz10@users.noreply.github.com> Date: Tue, 7 Sep 2021 12:05:42 -0700 Subject: [PATCH] test(samples): replace the deleted gcs file with gcs file located in cloud-samples-data (#390) * Added Update Intent Snippet and Test * Deleted Setting Env Vars * Fixed Lint Issues * Fixed Lint and Build Issue * Fixed Build Issue * Changed tests to pytests * Removed delete and create agent from test * Fixed Import Order * Deleted unused import * Removed Language from update_intent Snippet * Added copyright * Changed intent name to random name * delete intent after testing * fix test * remove contains * Added Create Intent * fix lint * test(samples): replace the deleted gcs file with public file Co-authored-by: Anthonios Partheniou --- dialogflow/participant_management_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dialogflow/participant_management_test.py b/dialogflow/participant_management_test.py index 7c9a7fbadd12..f26c9376c350 100644 --- a/dialogflow/participant_management_test.py +++ b/dialogflow/participant_management_test.py @@ -40,11 +40,13 @@ def test_analyze_content_text(capsys): out, _ = capsys.readouterr() assert 'Display Name: {}'.format(KNOWLEDGE_BASE_DISPLAY_NAME) in out - # Create documents. + # Create documents. Note that you should get read permission of bucket gs://cloud-samples-data/dialogflow/participant_test.html + # via Pantheon for service account (google application credential account) from here: + # https://support.google.com/googleshopping/answer/9116497 document_management.create_document(PROJECT_ID, knowledge_base_id, DOCUMENT_DISPLAY_NAME, 'text/html', 'ARTICLE_SUGGESTION', - 'https://support.google.com/googleshopping/answer/9116497') + 'gs://cloud-samples-data/dialogflow/participant_test.html') out, _ = capsys.readouterr() document_id = out.split('documents/')[1].split(' - MIME Type:')[0].rstrip()