### What problem does this PR solve?
Fix errors detected by Ruff
### Type of change
- [x] Refactoring
Add tests for frontend API (#3552)
liuhua+1: liuhua
8faf53b
### What problem does this PR solve?
Add tests for frontend API
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>