equal
deleted
inserted
replaced
11 def test_load_hooks_twice(self): |
11 def test_load_hooks_twice(self): |
12 class vreg: |
12 class vreg: |
13 @staticmethod |
13 @staticmethod |
14 def registry_objects(registry): |
14 def registry_objects(registry): |
15 return [] |
15 return [] |
16 |
16 |
17 cfg1 = TestServerConfiguration('data/config1') |
17 cfg1 = TestServerConfiguration('data/config1') |
18 cfg1.bootstrap_cubes() |
18 cfg1.bootstrap_cubes() |
19 cfg2 = TestServerConfiguration('data/config2') |
19 cfg2 = TestServerConfiguration('data/config2') |
20 cfg2.bootstrap_cubes() |
20 cfg2.bootstrap_cubes() |
21 self.failIf(cfg1.load_hooks(vreg) is cfg2.load_hooks(vreg)) |
21 self.failIf(cfg1.load_hooks(vreg) is cfg2.load_hooks(vreg)) |
22 self.failUnless('after_add_relation' in cfg1.load_hooks(vreg)) |
22 self.failUnless('after_add_relation' in cfg1.load_hooks(vreg)) |
23 self.failUnless('after_delete_relation' in cfg2.load_hooks(vreg)) |
23 self.failUnless('after_delete_relation' in cfg2.load_hooks(vreg)) |
24 |
24 |
25 |
25 |
26 if __name__ == '__main__': |
26 if __name__ == '__main__': |
27 unittest_main() |
27 unittest_main() |