cubicweb/server/test/unittest_migractions.py
changeset 11277 baed516c6f6e
parent 11273 c655e19cbc35
child 11291 7c565548fb09
equal deleted inserted replaced
11276:6eeb7abda47a 11277:baed516c6f6e
   771             bob = mh.cmd_create_entity('Personne', nom=u'bob')
   771             bob = mh.cmd_create_entity('Personne', nom=u'bob')
   772             bffss_dir_content = os.listdir(tempfile.tempdir)
   772             bffss_dir_content = os.listdir(tempfile.tempdir)
   773             self.assertEqual(len(bffss_dir_content), 1)
   773             self.assertEqual(len(bffss_dir_content), 1)
   774             john.cw_clear_all_caches()
   774             john.cw_clear_all_caches()
   775             self.assertEqual(john.photo.getvalue(),
   775             self.assertEqual(john.photo.getvalue(),
   776                              osp.join(tempfile.tempdir, bffss_dir_content[0]))
   776                              osp.join(tempfile.tempdir,
       
   777                                       bffss_dir_content[0]).encode('utf8'))
   777             bob.cw_clear_all_caches()
   778             bob.cw_clear_all_caches()
   778             self.assertIsNone(bob.photo)
   779             self.assertIsNone(bob.photo)
   779             bill.cw_clear_all_caches()
   780             bill.cw_clear_all_caches()
   780             self.assertIsNone(bill.photo)
   781             self.assertIsNone(bill.photo)
   781             storages.unset_attribute_storage(self.repo, 'Personne', 'photo')
   782             storages.unset_attribute_storage(self.repo, 'Personne', 'photo')