add test view and fix bug in topic.py