Ejemplo n.º 1
0
def test_get_description_without_description():
    image_data = _get_resource_json('image_data_example.json')
    image_data.pop('dcDescriptionLangAware', None)
    image_data.pop('dcDescription', None)
    expect_description = ""

    assert europeana._get_description(image_data) == expect_description
Ejemplo n.º 2
0
def test_get_description_with_langaware_en():
    image_data = _get_resource_json('image_data_example.json')
    image_data['dcDescriptionLangAware']['en'] = [
        'First English Description', 'Second English Description']
    expect_description = "First English Description"

    assert europeana._get_description(image_data) == expect_description
Ejemplo n.º 3
0
def test_get_description_without_langaware():
    image_data = _get_resource_json('image_data_example.json')
    image_data.pop('dcDescriptionLangAware', None)
    expect_description = "Sello en seco: España artística y monumental."

    assert europeana._get_description(image_data) == expect_description
Ejemplo n.º 4
0
def test_get_description_with_langaware_def():
    image_data = _get_resource_json('image_data_example.json')

    expect_description = "Sello en seco: España artística y monumental."

    assert europeana._get_description(image_data) == expect_description