From 1b0f71579be9c9c27b5fece2243b10f458f7b8f6 Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 8 May 2023 11:34:45 -0400 Subject: [PATCH] pyl --- .../integration/test_process_api.py | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py index f767bd7c2..cccc32c8f 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py @@ -1037,10 +1037,14 @@ class TestProcessApi(BaseTest): with_db_and_bpmn_file_cleanup: None, with_super_admin_user: UserModel, ) -> None: - self.create_group_and_model_with_bpmn(client, with_super_admin_user, process_group_id="admin_only", process_model_id='random_fact') - self.create_group_and_model_with_bpmn(client, with_super_admin_user, process_group_id="all_users", process_model_id='hello_world') - user_one = self.create_user_with_permission(username="user_one", target_uri='/v1.0/process-groups/all_users:*') - self.add_permissions_to_user(user=user_one, target_uri='/v1.0/process-groups', permission_names=['read']) + self.create_group_and_model_with_bpmn( + client, with_super_admin_user, process_group_id="admin_only", process_model_id="random_fact" + ) + self.create_group_and_model_with_bpmn( + client, with_super_admin_user, process_group_id="all_users", process_model_id="hello_world" + ) + user_one = self.create_user_with_permission(username="user_one", target_uri="/v1.0/process-groups/all_users:*") + self.add_permissions_to_user(user=user_one, target_uri="/v1.0/process-groups", permission_names=["read"]) response = client.get( "/v1.0/process-groups", @@ -1060,7 +1064,7 @@ class TestProcessApi(BaseTest): assert response.status_code == 200 assert response.json is not None assert len(response.json["results"]) == 1 - assert response.json['results'][0]['id'] == 'all_users' + assert response.json["results"][0]["id"] == "all_users" assert response.json["pagination"]["count"] == 1 assert response.json["pagination"]["total"] == 1 assert response.json["pagination"]["pages"] == 1 @@ -1072,10 +1076,14 @@ class TestProcessApi(BaseTest): with_db_and_bpmn_file_cleanup: None, with_super_admin_user: UserModel, ) -> None: - self.create_group_and_model_with_bpmn(client, with_super_admin_user, process_group_id="admin_only", process_model_id='random_fact') - self.create_group_and_model_with_bpmn(client, with_super_admin_user, process_group_id="all_users", process_model_id='hello_world') - user_one = self.create_user_with_permission(username="user_one", target_uri='/v1.0/process-models/all_users:*') - self.add_permissions_to_user(user=user_one, target_uri='/v1.0/process-models', permission_names=['read']) + self.create_group_and_model_with_bpmn( + client, with_super_admin_user, process_group_id="admin_only", process_model_id="random_fact" + ) + self.create_group_and_model_with_bpmn( + client, with_super_admin_user, process_group_id="all_users", process_model_id="hello_world" + ) + user_one = self.create_user_with_permission(username="user_one", target_uri="/v1.0/process-models/all_users:*") + self.add_permissions_to_user(user=user_one, target_uri="/v1.0/process-models", permission_names=["read"]) response = client.get( "/v1.0/process-models?recursive=true", @@ -1095,7 +1103,7 @@ class TestProcessApi(BaseTest): assert response.status_code == 200 assert response.json is not None assert len(response.json["results"]) == 1 - assert response.json['results'][0]['id'] == 'all_users/hello_world' + assert response.json["results"][0]["id"] == "all_users/hello_world" assert response.json["pagination"]["count"] == 1 assert response.json["pagination"]["total"] == 1 assert response.json["pagination"]["pages"] == 1