<commit_before>!define TEST_SYSTEM {slim}
!define file {4}
#!define projectId {$project}

!3 Generate Random Variables 
!|Table: Rest Fixture | $baseURL |
|let|sName|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|groupId|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|emptyGroup|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||

!3 Create Study 
!|Table: Rest Fixture | $baseURL |
| setBody | {"name" : "$sName",  "alias" : "$sAlias", "type" : "CASE_CONTROL"}|
| setHeader|Content-Type:application/json|
| POST | /v1/studies/create?sid=$sessionId&projectId=$projectId |200|  Content-Type: application/json ||
|let|studyId|js|response.jsonbody.response[0].result[0].id||

!3 Get Study 
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId/info?sid=$sessionId|200|  Content-Type: application/json |jsonbody.error == '' && jsonbody.response[0].result[0].id == '$studyId'|

!3 Update Study 
!|Table: Rest Fixture | $baseURL |
| setBody | {"name" : "newName"}|
| setHeader|Content-Type:application/json|
| POST | /v1/studies/$studyId/update?sid=$sessionId |200|  Content-Type: application/json |jsonbody.response[0].result[0].name == 'newName'|

!3 Get Study 
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId/info?sid=$sessionId|200|  Content-Type: application/json |jsonbody.error == '' && jsonbody.response[0].result[0].name == 'newName'|

!3 Get Study ACL
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId/acl?sid=$sessionId|200|  Content-Type: application/json |jsonbody.error == '' && jsonbody.response[0].result ==''|

#change response code after fixing
!3 (Negative) Get Study ACL with Mulitple Ids
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId,$study/acl?sid=$sessionId|200|  Content-Type: application/json ||
| GET | /v1/studies/$study,$studyId/acl?sid=$sessionId|200|  Content-Type: application/json ||
| GET | /v1/studies/$studyId,$studyId/acl?sid=$sessionId|200|  Content-Type: application/json ||
| GET | /v1/studies/$study,$study/acl?sid=$sessionId|200|  Content-Type: application/json ||
<commit_msg>Test: adopted tests with REST list ids changes<commit_after>!define TEST_SYSTEM {slim}
!define file {4}
#!define projectId {$project}

!3 Generate Random Variables 
!|Table: Rest Fixture | $baseURL |
|let|sName|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|sAlias|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|groupId|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||
|let|emptyGroup|js|Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)||

!3 Create Study 
!|Table: Rest Fixture | $baseURL |
| setBody | {"name" : "$sName",  "alias" : "$sAlias", "type" : "CASE_CONTROL"}|
| setHeader|Content-Type:application/json|
| POST | /v1/studies/create?sid=$sessionId&projectId=$projectId |200|  Content-Type: application/json ||
|let|studyId|js|response.jsonbody.response[0].result[0].id||

!3 Get Study 
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId/info?sid=$sessionId|200|  Content-Type: application/json |jsonbody.error == '' && jsonbody.response[0].result[0].id == '$studyId'|

!3 Update Study 
!|Table: Rest Fixture | $baseURL |
| setBody | {"name" : "newName"}|
| setHeader|Content-Type:application/json|
| POST | /v1/studies/$studyId/update?sid=$sessionId |200|  Content-Type: application/json |jsonbody.response[0].result[0].name == 'newName'|

!3 Get Study 
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId/info?sid=$sessionId|200|  Content-Type: application/json |jsonbody.error == '' && jsonbody.response[0].result[0].name == 'newName'|

!3 Get Study ACL
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId/acl?sid=$sessionId|200|  Content-Type: application/json |jsonbody.error == '' && jsonbody.response[0].result ==''|

!3 Get Study ACL with Mulitple Ids
!|Table: Rest Fixture | $baseURL |
| GET | /v1/studies/$studyId,$study/acl?sid=$sessionId|200|  Content-Type: application/json ||

{'fraction_non_alphanumeric': 0.2109450337512054, 'fraction_numerical': 0.03037608486017358, 'mean_word_length': 5.7353896103896105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1223791', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1526, 'n_words': 275}