def test_get_resource_type_raises_on_invalid_input(): client = ArchivesSpaceClient(**AUTH) with pytest.raises(ArchivesSpaceError): client.resource_type('invalid')
def test_get_resource_type(): client = ArchivesSpaceClient(**AUTH) assert client.resource_type('/repositories/2/resources/2') == 'resource' assert client.resource_type( '/repositories/2/archival_objects/3') == 'resource_component'