Exemplo n.º 1
0
def test_is_empty_when_cleared():
    metadata = Metadata()
    metadata["artist"] = "John Doe"
    metadata.addImage("img/jpeg", "...")
    metadata.clear()
    assert_that(metadata.empty(), is_(True), "emptiness")
Exemplo n.º 2
0
def test_is_not_empty_when_containing_images():
    metadata = Metadata()
    metadata.addImage("img/jpeg", "...")
    assert_that(metadata.empty(), is_(False), "emptiness")
Exemplo n.º 3
0
def test_is_not_empty_when_holding_tags():
    metadata = Metadata()
    metadata["artist"] = "John Doe"
    metadata.addImage("img/jpeg", "...")
    assert_that(metadata.empty(), is_(False), "emptiness")
Exemplo n.º 4
0
def test_is_initially_empty():
    metadata = Metadata()
    assert_that(metadata, empty(), "tags")
    assert_that(list(metadata.images), empty(), "images")
    assert_that(metadata.empty(), is_(True), "emptiness")