def test_identifier_search_wildcard(): client = ArchivesSpaceClient(**AUTH) # Searching for an identifier prefix with no wildcard returns nothing assert client.find_collection_ids(identifier='F') == [] assert client.count_collections(identifier='F') == 0 assert len(client.find_collections(identifier='F')) == 0 assert client.find_collection_ids(identifier='F*') == ['/repositories/2/resources/1', '/repositories/2/resources/2'] assert client.count_collections(identifier='F*') == 2 assert len(client.find_collections(identifier='F*')) == 2
def test_identifier_search_exact_match(): client = ArchivesSpaceClient(**AUTH) assert client.find_collection_ids(identifier='F1') == ['/repositories/2/resources/1'] assert client.count_collections(identifier='F1') == 1 assert len(client.find_collections(identifier='F1')) == 1
def test_find_collection_ids_search(): client = ArchivesSpaceClient(**AUTH) ids = client.find_collection_ids(search_pattern='Some') assert ids == ['/repositories/2/resources/2']
def test_find_collection_ids(): client = ArchivesSpaceClient(**AUTH) ids = client.find_collection_ids() assert ids == ['/repositories/2/resources/1', '/repositories/2/resources/2']