pat2vec.pat2vec_search.test_cogstack_search_methods

Classes

TestCogstackSearchMethods([methodName])

Unit tests for the CogStack search utility module.

class pat2vec.pat2vec_search.test_cogstack_search_methods.TestCogstackSearchMethods(methodName='runTest')[source]

Bases: TestCase

Unit tests for the CogStack search utility module.

test_list_chunker()[source]

Test splitting a list into chunks of 10,000.

test_set_index_safe_wrapper_failure()[source]

Test graceful failure when the ‘id’ column is missing.

test_check_patients_existence_basic(mock_initialize)[source]

Test patient existence check using terms aggregation.

test_check_patients_existence_fielddata_fallback(mock_initialize)[source]

Test fallback to search-based check when fielddata is disabled (aggregation fails).

test_initialize_cogstack_client_from_config_path(mock_spec)[source]

Test initializing the client using a specific credentials path in config.