Ejemplo n.º 1
0
 def test_set_value(self):
     tag = IptcTag('Iptc.Application2.City', ['Seattle'])
     old_value = tag.value
     tag.value = ['Barcelona']
     self.failIfEqual(tag.value, old_value)
Ejemplo n.º 2
0
 def test_set_value(self):
     tag = IptcTag('Iptc.Application2.City', ['Seattle'])
     old_value = tag.value
     tag.value = ['Barcelona']
     self.failIfEqual(tag.value, old_value)
Ejemplo n.º 3
0
def test_set_value():
    tag = IptcTag('Iptc.Application2.City', ['Seattle'])
    old_value = tag.value
    tag.value = ['Barcelona']
    assert tag.value != old_value
Ejemplo n.º 4
0
def test_set_value_non_repeatable():
    tag = IptcTag('Iptc.Application2.ReleaseDate')
    value = [D.today(), D.today()]
    with pytest.raises(KeyError):
        tag.value = value
Ejemplo n.º 5
0
def test_set_single_value_raises():
    tag = IptcTag('Iptc.Application2.City', ['Seattle'])
    with pytest.raises(TypeError):
        tag.value = 'Barcelona'