fix unittest TypeError, add proper response