Exemple #1
0
 def setUp(self):
     super(CustomHooksTest, self).setUp()
     self.hook_name = "some_custom_hook"
     self.hook = hooks.add_custom_hook(self.hook_name)
Exemple #2
0
 def test_cannot_install_default_hooks(self):
     with self.assertRaises(gossip.exceptions.NameAlreadyUsed):
         hooks.add_custom_hook("test_start")
Exemple #3
0
 def test_cannot_reinstall_hook_twice(self):
     with self.assertRaises(gossip.exceptions.NameAlreadyUsed):
         hooks.add_custom_hook(self.hook_name)
Exemple #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)
Exemple #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")
Exemple #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)