From 3357ed0d4ffab468730c68ae9e4544209fc2eda2 Mon Sep 17 00:00:00 2001 From: Olivier Tilloy Date: Wed, 17 Nov 2010 09:38:02 +0100 Subject: Add a unit test to check that an exception is raised when trying to set multiple values to a non-repeatable IPTC tag. --- test/iptc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/iptc.py b/test/iptc.py index 1940efd..6da1580 100644 --- a/test/iptc.py +++ b/test/iptc.py @@ -195,3 +195,8 @@ class TestIptcTag(unittest.TestCase): values = ['foo'] self.failUnlessRaises(ValueError, tag._set_raw_values, values) + def test_set_values_non_repeatable(self): + tag = IptcTag('Iptc.Application2.ReleaseDate') + values = [datetime.date.today(), datetime.date.today()] + self.failUnlessRaises(KeyError, tag._set_values, values) + -- cgit