test/unittest_entity.py
changeset 4835 13b0b96d7982
parent 4691 ae468fae9965
child 5174 78438ad513ca
child 5421 8167de96c523
equal deleted inserted replaced
4834:b718626a0e60 4835:13b0b96d7982
   434         self.assertEquals(p1.evaluee[0].nom, "toto")
   434         self.assertEquals(p1.evaluee[0].nom, "toto")
   435         self.failUnless(not p1.reverse_evaluee)
   435         self.failUnless(not p1.reverse_evaluee)
   436 
   436 
   437     def test_complete_relation(self):
   437     def test_complete_relation(self):
   438         session = self.session
   438         session = self.session
   439         eid = session.unsafe_execute(
   439         eid = session.execute(
   440             'INSERT TrInfo X: X comment "zou", X wf_info_for U, X from_state S1, X to_state S2 '
   440             'INSERT TrInfo X: X comment "zou", X wf_info_for U, X from_state S1, X to_state S2 '
   441             'WHERE U login "admin", S1 name "activated", S2 name "deactivated"')[0][0]
   441             'WHERE U login "admin", S1 name "activated", S2 name "deactivated"')[0][0]
   442         trinfo = self.entity('Any X WHERE X eid %(x)s', {'x': eid}, 'x')
   442         trinfo = self.entity('Any X WHERE X eid %(x)s', {'x': eid}, 'x')
   443         trinfo.complete()
   443         trinfo.complete()
   444         self.failUnless(isinstance(trinfo['creation_date'], datetime))
   444         self.failUnless(isinstance(trinfo['creation_date'], datetime))