修复 account 里面的单元测试错误

This commit is contained in:
virusdefender 2015-08-24 03:56:12 +08:00
parent d074296087
commit fca5abaf6d

View File

@ -280,7 +280,7 @@ class LoginRequiredDecoratorTest(TestCase):
def test_cbv_without_args(self):
# 没登陆
response = self.client.get("/login_required_test/cbv/1/")
self.assertTemplateUsed(response, "utils/error.html")
self.assertRedirects(response, "/login/")
# 登陆后
self.client.login(username="test", password="test")
@ -353,7 +353,7 @@ class AdminRequiredDecoratorTest(TestCase):
def test_cbv_without_args(self):
# 没登陆
response = self.client.get("/admin_required_test/cbv/1/")
self.assertRedirects(response, "/login/")
self.assertTemplateUsed(response, "utils/error.html")
# 登陆后
self.client.login(username="test", password="test")