Skip to content

Commit 1bd2b15

Browse files
committed
Fix ut for create
1 parent 50e75b7 commit 1bd2b15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_post.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def setup(self):
2222
def test_create(self):
2323

2424
category = Category.objects.first()
25-
url = url_for('home.create')
25+
url = url_for('home.create_topic')
2626
form = {
2727
'title': '标题',
2828
'content': '内容喜喜喜喜喜喜',
@@ -43,10 +43,10 @@ def test_detail(self):
4343

4444
def test_comment(self):
4545
post = Post.objects.first()
46-
url = url_for('post.detail', id=post.id)
46+
url = url_for('home.create_comment')
4747
form = {
4848
'content': '评论测试',
49-
'ref_id': 0,
49+
'ref_id': post.id,
5050
}
5151
self.client.post(url, data=form, follow_redirects=False)
5252
post.reload()

0 commit comments

Comments
 (0)