Example #1
0
 def test_File_setFormat(self):
     # Setting the DC.format must also set the content_type property
     file = File('testfile', format='image/jpeg')
     self.assertEqual(file.Format(), 'image/jpeg')
     self.assertEqual(file.content_type, 'image/jpeg')
     file.setFormat('image/gif')
     self.assertEqual(file.Format(), 'image/gif')
     self.assertEqual(file.content_type, 'image/gif')