Beispiel #1
0
 def test_overwrite_property(self):
     with self.assertRaises(ValueError) as cm:
         MediaFile.add_field('artist', MediaField())
     self.assertIn(u'property "artist" already exists',
                   unicode(cm.exception))
Beispiel #2
0
 def test_overwrite_property(self):
     with self.assertRaises(ValueError) as cm:
         MediaFile.add_field('artist', MediaField())
     self.assertIn(u'property "artist" already exists',
                   unicode(cm.exception))
Beispiel #3
0
 def test_invalid_descriptor(self):
     with self.assertRaises(ValueError) as cm:
         MediaFile.add_field('somekey', True)
     self.assertIn(u'must be an instance of MediaField',
                   unicode(cm.exception))
Beispiel #4
0
 def test_invalid_descriptor(self):
     with self.assertRaises(ValueError) as cm:
         MediaFile.add_field('somekey', True)
     self.assertIn(u'must be an instance of MediaField',
                   unicode(cm.exception))