Unit Tests
- Successful hook tests now query the task to make sure processing continued. Could be better.
This commit is contained in:
@@ -56,6 +56,9 @@ class TestHooksOnAdd(TestCase):
|
||||
logs = hook.get_logs()
|
||||
self.assertEqual(logs["output"]["msgs"][0], "FEEDBACK")
|
||||
|
||||
code, out, err = self.t(("1", "info"))
|
||||
self.assertIn("Description foo", out)
|
||||
|
||||
def test_onadd_builtin_reject(self):
|
||||
"""on-add-reject - a well-behaved, failing, on-add hook."""
|
||||
hookname = 'on-add-reject'
|
||||
|
||||
@@ -57,6 +57,10 @@ class TestHooksOnModify(TestCase):
|
||||
logs = hook.get_logs()
|
||||
self.assertEqual(logs["output"]["msgs"][0], "FEEDBACK")
|
||||
|
||||
code, out, err = self.t(("1", "info"))
|
||||
self.assertIn("Description foo", out)
|
||||
self.assertIn("Tags tag", out)
|
||||
|
||||
def test_onmodify_builtin_reject(self):
|
||||
"""on-modify-reject - a well-behaved, failing, on-modify hook."""
|
||||
hookname = 'on-modify-reject'
|
||||
|
||||
Reference in New Issue
Block a user