Python Unit Testing Threaded Codex App