mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
修复 account 里面的单元测试错误
This commit is contained in:
parent
d074296087
commit
fca5abaf6d
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user