test/unittest_entity.py
branchstable
changeset 9160 7db0c75acf1c
parent 8735 5567a5117aeb
child 9214 be05b42b4825
equal deleted inserted replaced
9159:7a6ea3468765 9160:7db0c75acf1c
   641         e.cw_attr_cache['data'] = Binary('some <em>data</em>')
   641         e.cw_attr_cache['data'] = Binary('some <em>data</em>')
   642         e.cw_attr_cache['data_name'] = 'an html file'
   642         e.cw_attr_cache['data_name'] = 'an html file'
   643         e.cw_attr_cache['data_format'] = 'text/html'
   643         e.cw_attr_cache['data_format'] = 'text/html'
   644         e.cw_attr_cache['data_encoding'] = 'ascii'
   644         e.cw_attr_cache['data_encoding'] = 'ascii'
   645         e._cw.transaction_data = {} # XXX req should be a session
   645         e._cw.transaction_data = {} # XXX req should be a session
   646         self.assertEqual(e.cw_adapt_to('IFTIndexable').get_words(),
   646         words = e.cw_adapt_to('IFTIndexable').get_words()
   647                           {'C': ['an', 'html', 'file', 'du', 'html', 'some', 'data']})
   647         words['C'].sort()
       
   648         self.assertEqual({'C': sorted(['an', 'html', 'file', 'du', 'html', 'some', 'data'])},
       
   649                          words)
   648 
   650 
   649 
   651 
   650     def test_nonregr_relation_cache(self):
   652     def test_nonregr_relation_cache(self):
   651         req = self.request()
   653         req = self.request()
   652         p1 = req.create_entity('Personne', nom=u'di mascio', prenom=u'adrien')
   654         p1 = req.create_entity('Personne', nom=u'di mascio', prenom=u'adrien')