Fixed imports according to conventions
Added tests to generate_tasks.py
Replaced asserts with assertIsNotNone