hooks/test/unittest_syncschema.py
changeset 7845 2172978be237
parent 7791 31bb51ea5485
parent 7815 2a164a9cf81c
child 8483 4ba11607d84a
child 8715 ab0cd0765076
equal deleted inserted replaced
7841:287813c487b7 7845:2172978be237
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
   180             self.commit()
   180             self.commit()
   181             self.assertFalse(self.schema['state_of'].inlined)
   181             self.assertFalse(self.schema['state_of'].inlined)
   182             self.assertFalse(self.index_exists('State', 'state_of'))
   182             self.assertFalse(self.index_exists('State', 'state_of'))
   183             rset = self.execute('Any X, Y WHERE X state_of Y')
   183             rset = self.execute('Any X, Y WHERE X state_of Y')
   184             self.assertEqual(len(rset), 2) # user states
   184             self.assertEqual(len(rset), 2) # user states
   185         except:
   185         except Exception:
   186             import traceback
   186             import traceback
   187             traceback.print_exc()
   187             traceback.print_exc()
   188         finally:
   188         finally:
   189             self.execute('SET X inlined TRUE WHERE X name "state_of"')
   189             self.execute('SET X inlined TRUE WHERE X name "state_of"')
   190             self.assertFalse(self.schema['state_of'].inlined)
   190             self.assertFalse(self.schema['state_of'].inlined)