-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from code42/fix-issues-from-sagar
- Loading branch information
Showing
3 changed files
with
21 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1307,13 +1307,7 @@ def test_highriskemployee_get_all_command_when_given_risk_tags_only_gets_employe | |
client = create_client(code42_high_risk_employee_mock) | ||
_, _, res = highriskemployee_get_all_command( | ||
client, | ||
{ | ||
"risktags": [ | ||
"PERFORMANCE_CONCERNS", | ||
"SUSPICIOUS_SYSTEM_ACTIVITY", | ||
"POOR_SECURITY_PRACTICES", | ||
] | ||
}, | ||
{"risktags": "PERFORMANCE_CONCERNS SUSPICIOUS_SYSTEM_ACTIVITY POOR_SECURITY_PRACTICES"}, | ||
) | ||
# Only first employee has the given risk tags | ||
expected = [json.loads(MOCK_GET_ALL_HIGH_RISK_EMPLOYEES_RESPONSE)["items"][0]] | ||
|
@@ -1332,11 +1326,7 @@ def test_highriskemployee_get_all_command_when_no_employees(code42_high_risk_emp | |
_, _, res = highriskemployee_get_all_command( | ||
client, | ||
{ | ||
"risktags": [ | ||
"PERFORMANCE_CONCERNS", | ||
"SUSPICIOUS_SYSTEM_ACTIVITY", | ||
"POOR_SECURITY_PRACTICES", | ||
] | ||
"risktags": "PERFORMANCE_CONCERNS SUSPICIOUS_SYSTEM_ACTIVITY POOR_SECURITY_PRACTICES" | ||
}, | ||
) | ||
# Only first employee has the given risk tags | ||
|
@@ -1353,14 +1343,14 @@ def test_highriskemployee_add_risk_tags_command(code42_sdk_mock): | |
expected_user_id = "123412341234123412" # value found in GET_USER_RESPONSE | ||
assert res == expected_user_id | ||
code42_sdk_mock.detectionlists.add_user_risk_tags.assert_called_once_with( | ||
expected_user_id, "FLIGHT_RISK" | ||
expected_user_id, ["FLIGHT_RISK"] | ||
) | ||
|
||
|
||
def test_highriskemployee_remove_risk_tags_command(code42_sdk_mock): | ||
client = create_client(code42_sdk_mock) | ||
_, _, res = highriskemployee_remove_risk_tags_command( | ||
client, {"username": "[email protected]", "risktags": ["FLIGHT_RISK", "CONTRACT_EMPLOYEE"]} | ||
client, {"username": "[email protected]", "risktags": "FLIGHT_RISK CONTRACT_EMPLOYEE"} | ||
) | ||
expected_user_id = "123412341234123412" # value found in GET_USER_RESPONSE | ||
assert res == expected_user_id | ||
|