add unit test and fix bug
: django.test.TestCase