From 1cd09cc1b77b21d6e97b8fc29f7c24e4f84dfd3a Mon Sep 17 00:00:00 2001 From: Sylvia McLaughlin <85905333+sylviamclaughlin@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:13:24 +0000 Subject: [PATCH 1/2] Adding new document for the command role --- app/modules/role/role.py | 12 ++++++++++++ app/tests/modules/role/test_role.py | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/app/modules/role/role.py b/app/modules/role/role.py index 575d9f47..4b9b6bc3 100644 --- a/app/modules/role/role.py +++ b/app/modules/role/role.py @@ -262,6 +262,18 @@ def role_view_handler(ack, body, say, logger, client): f"Created document: Recruitment Feedback Template in folder: Recruitment Feedback/ {recruitment_feedback_template_id}" ) + panelist_guidebook_template_id = google_drive.copy_file_to_folder( + os.getenv("PANELIST_GUIDEBOOK_TEMPLATE"), + f"Panelist Guidebook - Interview Best Practices - {role_name}", + os.getenv("TEMPLATES_FOLDER"), + folder_id, + scopes=ROLE_SCOPES, + delegated_user_email=BOT_EMAIL, + ) + logger.info( + f"Created document: Panelist Guidebook Template in folder: Panelist Guidebook/ {panelist_guidebook_template_id}" + ) + # Create channel response = client.conversations_create(name=private_channel_name, is_private=True) diff --git a/app/tests/modules/role/test_role.py b/app/tests/modules/role/test_role.py index 465930b5..b529706a 100644 --- a/app/tests/modules/role/test_role.py +++ b/app/tests/modules/role/test_role.py @@ -323,6 +323,14 @@ def test_copy_files_to_internal_talent_folder( scopes=["https://www.googleapis.com/auth/drive"], delegated_user_email="bot_email", ), + call( + os.getenv("PANELIST_GUIDEBOOK_TEMPLATE"), + "Panelist Guidebook - Interview Best Practices - foo", + os.getenv("TEMPLATES_FOLDER"), + "folder_id", + scopes=["https://www.googleapis.com/auth/drive"], + delegated_user_email="bot_email", + ) ] ) From be56d99a2b72473f69cb84e4c917f048a56dcf30 Mon Sep 17 00:00:00 2001 From: Sylvia McLaughlin <85905333+sylviamclaughlin@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:18:57 +0000 Subject: [PATCH 2/2] Reformatting --- app/tests/modules/role/test_role.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/modules/role/test_role.py b/app/tests/modules/role/test_role.py index b529706a..93fd1ddf 100644 --- a/app/tests/modules/role/test_role.py +++ b/app/tests/modules/role/test_role.py @@ -330,7 +330,7 @@ def test_copy_files_to_internal_talent_folder( "folder_id", scopes=["https://www.googleapis.com/auth/drive"], delegated_user_email="bot_email", - ) + ), ] )