fix is_test keyError bug when run one test