增加用户密码修改成功的API测试,以及增加用户邮箱字段并做了相应的API测试,目前的account/view.py测试覆盖率为100%

This commit is contained in:
hohoTT
2015-08-05 20:11:25 +08:00
parent 17b44800ca
commit 117a6d3525
6 changed files with 99 additions and 8 deletions

View File

@@ -3,7 +3,8 @@ from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from account.views import UserLoginAPIView, UsernameCheckAPIView, UserRegisterAPIView, UserChangePasswordAPIView
from account.views import UserLoginAPIView, UsernameCheckAPIView, UserRegisterAPIView, UserChangePasswordAPIView, \
EmailCheckAPIView
from announcement.views import AnnouncementAPIView
urlpatterns = [
@@ -17,6 +18,7 @@ urlpatterns = [
url(r'^api/register/$', UserRegisterAPIView.as_view(), name="user_register_api"),
url(r'^api/change_password/$', UserChangePasswordAPIView.as_view(), name="user_change_password_api"),
url(r'^api/username_check/$', UsernameCheckAPIView.as_view(), name="username_check_api"),
url(r'^api/email_check/$', EmailCheckAPIView.as_view(), name="email_check_api"),
url(r'^api/admin/announcement/$', AnnouncementAPIView.as_view(), name="announcement_api"),
url(r'^problem/(?P<problem_id>\d+)/$', "problem.views.problem_page", name="problem_page"),