Python Unit Testing Threaded Codex Application