Unittests and exceptions terminate_index - helpers.py