コード例 #1
0
 def test_refresh_user_scim_attributes_returns_response(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     response = module.refresh_user_scim_attributes(TEST_USER_ID)
     assert response
コード例 #2
0
 def test_update_user_notes_returns_response(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     response = module.update_user_notes(TEST_USER_ID, "newnotes")
     assert response
コード例 #3
0
 def test_remove_user_cloud_alias_returns_response(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     response = module.remove_user_cloud_alias(TEST_USER_ID, "oldalias")
     assert response
コード例 #4
0
 def test_add_user_risk_tags_returns_response(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     response = module.add_user_risk_tags(TEST_USER_ID, "newtag")
     assert response
コード例 #5
0
 def test_add_user_risk_tags_calls_user_client_with_expected_values(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     module.add_user_risk_tags(TEST_USER_ID, "newtag")
     mock_detection_list_user_client.add_risk_tags.assert_called_once_with(
         TEST_USER_ID, "newtag")
コード例 #6
0
 def test_update_user_notes_calls_user_client_with_expected_values(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     module.update_user_notes(TEST_USER_ID, "newnotes")
     mock_detection_list_user_client.update_notes.assert_called_once_with(
         TEST_USER_ID, "newnotes")
コード例 #7
0
 def test_get_user_by_id_calls_user_client_with_expected_values(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     module.get_user_by_id(TEST_USER_ID)
     mock_detection_list_user_client.get_by_id.assert_called_once_with(
         TEST_USER_ID)
コード例 #8
0
 def test_get_user_calls_user_client_with_expected_values(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     module.get_user("testusername")
     mock_detection_list_user_client.get.assert_called_once_with(
         "testusername")
コード例 #9
0
 def test_refresh_user_scim_attributes_calls_user_client_with_expected_values(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     module.refresh_user_scim_attributes(TEST_USER_ID)
     mock_detection_list_user_client.refresh.assert_called_once_with(
         TEST_USER_ID)
コード例 #10
0
 def test_remove_user_cloud_alias_calls_user_client_with_expected_values(
         self, mock_microservice_client_factory,
         mock_detection_list_user_client):
     mock_microservice_client_factory.get_detection_list_user_client.return_value = (
         mock_detection_list_user_client)
     module = DetectionListsModule(mock_microservice_client_factory)
     module.remove_user_cloud_alias(TEST_USER_ID, "oldalias")
     mock_detection_list_user_client.remove_cloud_alias.assert_called_once_with(
         TEST_USER_ID, "oldalias")
コード例 #11
0
 def test_high_risk_employee_returns_high_risk_employee_client(
         self, mock_microservice_client_factory):
     module = DetectionListsModule(mock_microservice_client_factory)
     _ = module.high_risk_employee
     assert mock_microservice_client_factory.get_high_risk_employee_client.call_count
コード例 #12
0
 def test_departing_employee_call_get_departing_employee_client_with_expected_values(
         self, mock_microservice_client_factory):
     module = DetectionListsModule(mock_microservice_client_factory)
     _ = module.departing_employee
     assert mock_microservice_client_factory.get_departing_employee_client.call_count