Ejemplo n.º 1
0
 def setUp(self):
     super(CustomHooksTest, self).setUp()
     self.hook_name = "some_custom_hook"
     self.hook = hooks.add_custom_hook(self.hook_name)
Ejemplo n.º 2
0
 def test_cannot_install_default_hooks(self):
     with self.assertRaises(gossip.exceptions.NameAlreadyUsed):
         hooks.add_custom_hook("test_start")
Ejemplo n.º 3
0
 def test_cannot_reinstall_hook_twice(self):
     with self.assertRaises(gossip.exceptions.NameAlreadyUsed):
         hooks.add_custom_hook(self.hook_name)
Ejemplo n.º 4
0
 def setUp(self):
     super(CustomHooksTest, self).setUp()
     self.hook_name = "some_custom_hook"
     with vintage.get_no_deprecations_context():
         self.hook = hooks.add_custom_hook(self.hook_name)
Ejemplo n.º 5
0
 def test_cannot_install_default_hooks(self):
     with vintage.get_no_deprecations_context(), \
         self.assertRaises(gossip.exceptions.NameAlreadyUsed):
         hooks.add_custom_hook("test_start")
Ejemplo n.º 6
0
 def test_cannot_reinstall_hook_twice(self):
     with vintage.get_no_deprecations_context(), \
         self.assertRaises(gossip.exceptions.NameAlreadyUsed):
         hooks.add_custom_hook(self.hook_name)