diff --git a/tests/real_responses/socialnetwork_api_workgroup_list.py b/tests/real_responses/socialnetwork_api_workgroup_list.py new file mode 100644 index 0000000..b8c9020 --- /dev/null +++ b/tests/real_responses/socialnetwork_api_workgroup_list.py @@ -0,0 +1,68 @@ +response = { + "result": { + "workgroups": [ + {"id": "8"}, + {"id": "10"}, + {"id": "12"}, + {"id": "14"}, + {"id": "16"}, + {"id": "18"}, + {"id": "20"}, + {"id": "22"}, + {"id": "24"}, + {"id": "26"}, + {"id": "28"}, + {"id": "30"}, + {"id": "32"}, + {"id": "34"}, + {"id": "36"}, + {"id": "38"}, + {"id": "40"}, + {"id": "42"}, + {"id": "44"}, + {"id": "46"}, + {"id": "48"}, + {"id": "50"}, + {"id": "52"}, + {"id": "54"}, + {"id": "58"}, + {"id": "60"}, + {"id": "62"}, + {"id": "64"}, + {"id": "66"}, + {"id": "68"}, + {"id": "70"}, + {"id": "72"}, + {"id": "73"}, + {"id": "74"}, + {"id": "76"}, + {"id": "78"}, + {"id": "80"}, + {"id": "82"}, + {"id": "83"}, + {"id": "85"}, + {"id": "87"}, + {"id": "89"}, + {"id": "91"}, + {"id": "93"}, + {"id": "95"}, + {"id": "97"}, + {"id": "99"}, + {"id": "101"}, + {"id": "103"}, + {"id": "105"}, + ] + }, + "next": 50, + "total": 50, + "time": { + "start": 1667156327.84961, + "finish": 1667156327.884964, + "duration": 0.035353899002075195, + "processing": 0.010620832443237305, + "date_start": "2022-10-30T21:58:47+03:00", + "date_finish": "2022-10-30T21:58:47+03:00", + "operating_reset_at": 1667156927, + "operating": 0, + }, +} diff --git a/tests/test_server_responses.py b/tests/test_server_responses.py index 4fc0f06..c13c368 100644 --- a/tests/test_server_responses.py +++ b/tests/test_server_responses.py @@ -210,3 +210,31 @@ def test_crm_stagehistory_list(bx_dummy): results = bx_dummy.get_all("crm.stagehistory.list") assert len(results) == 9 + + +def test_socialnetwork_api_workgroup_list(bx_dummy): + from tests.real_responses.socialnetwork_api_workgroup_list import response + + bx_dummy.srh = MockSRH(response) + results = bx_dummy.get_all( + "socialnetwork.api.workgroup.list", + { + "select": [ + "ID", + "NAME", + "DESCRIPTION", + "DATE_CREATE", + "DATE_UPDATE", + "DATE_ACTIVITY", + "SUBJECT_ID", + "KEYWORDS", + "IMAGE_ID", + "NUMBER_OF_MEMBERS", + "INITIATE_PERMS", + "SPAM_PERMS", + "SUBJECT_NAME", + ] + }, + ) + + assert len(results) == 50