Unittest - Template updated to include hook test examples

This commit is contained in:
Renato Alves 2015-01-19 14:57:33 +00:00
parent db78851b40
commit d68fa7ea8a
3 changed files with 125 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
original_task = sys.stdin.readline()
modified_task = sys.stdin.readline()
task = json.loads(modified_task)
task["description"] = "This is an example modify hook"
# A random message
sys.stdout.write("Hello from the template hook\n")
sys.stdout.write(json.dumps(task, separators=(',', ':')) + '\n')
sys.exit(1)
# vim: ai sts=4 et sw=4