equal
deleted
inserted
replaced
1 # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2013 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 |
32 class SchemaModificationHooksTC(CubicWebTC): |
32 class SchemaModificationHooksTC(CubicWebTC): |
33 reset_schema = True |
33 reset_schema = True |
34 |
34 |
35 def setUp(self): |
35 def setUp(self): |
36 super(SchemaModificationHooksTC, self).setUp() |
36 super(SchemaModificationHooksTC, self).setUp() |
37 self.repo.fill_schema() |
37 self.repo.set_schema(self.repo.deserialize_schema(), resetvreg=False) |
38 self.__class__.schema_eids = schema_eids_idx(self.repo.schema) |
38 self.__class__.schema_eids = schema_eids_idx(self.repo.schema) |
39 |
39 |
40 def index_exists(self, etype, attr, unique=False): |
40 def index_exists(self, etype, attr, unique=False): |
41 self.session.set_cnxset() |
41 self.session.set_cnxset() |
42 dbhelper = self.session.cnxset.source('system').dbhelper |
42 dbhelper = self.session.cnxset.source('system').dbhelper |