hooks/test/unittest_syncschema.py
branchstable
changeset 7815 2a164a9cf81c
parent 7398 26695dd703d8
child 7845 2172978be237
equal deleted inserted replaced
7814:1ec9fe1dfba9 7815:2a164a9cf81c
     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.failIf(self.schema['state_of'].inlined)
   181             self.failIf(self.schema['state_of'].inlined)
   182             self.failIf(self.index_exists('State', 'state_of'))
   182             self.failIf(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.failIf(self.schema['state_of'].inlined)
   190             self.failIf(self.schema['state_of'].inlined)