Exemple #1
0
def test_thumbnail_small():
    thumbnail_small = _get_resource_json("thumbnail_small.json")
    actual_image = sm._get_thumbnail_url(thumbnail_small)

    expected_image = "https://coimages.sciencemuseumgroup.org.uk/images/3/563/small_thumbnail_1999_0299_0001__0002_.jpg"

    assert actual_image == expected_image
def test_thumbnail_medium():
    thumbnail_medium = _get_resource_json("thumbnail_medium.json")
    actual_image = sm._get_thumbnail_url(thumbnail_medium)

    expected_image = (
        "https://coimages.sciencemuseumgroup.org.uk/images/3/563/"
        "medium_thumbnail_1999_0299_0001__0002_.jpg")

    assert actual_image == expected_image
def test_thumbnail_failure():
    thumbmail = {}
    actual_image = sm._get_thumbnail_url(thumbmail)

    assert actual_image is None