예제 #1
0
def test_find_resource_children_recursion_level():
    client = ArchivesSpaceClient(**AUTH)
    data = client.get_resource_component_and_children(
        '/repositories/2/resources/1', recurse_max_level=1)
    assert data['children'] is False

    data = client.get_resource_component_and_children(
        '/repositories/2/resources/1', recurse_max_level=2)
    assert len(data['children']) == 2
예제 #2
0
def test_find_resource_children():
    client = ArchivesSpaceClient(**AUTH)
    data = client.get_resource_component_and_children(
        '/repositories/2/resources/1')

    assert type(data) == dict
    assert len(data['children']) == 2
    assert data['title'] == 'Test fonds'