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