views的测试,每个用例单独跑能通过,跑测试套就出现bad request,请问老师是什么原因?
报错如下:
Testing started at 20:28 …
ssh://ubuntu@152.32.132.203:22/home/ubuntu/.virtualenvs/venv/bin/python -u /home/ubuntu/.pycharm_helpers/pycharm/django_test_manage.py test zanhu.news.test.test_views /home/ubuntu/website/zanhu
Creating test database for alias ‘default’…
System check identified no issues (0 silenced).
WARNING 2020-11-12 20:29:04,541 log 1114 140198981699392 Bad Request: /news/get-thread/
Failure
Traceback (most recent call last):
File “/home/ubuntu/website/zanhu/zanhu/news/test/test_views.py”, line 72, in test_get_thread
assert response.status_code == 200
AssertionError
WARNING 2020-11-12 20:29:04,541 log 1114 140198981699392 Bad Request: /news/get-thread/
Failure
Traceback (most recent call last):
File “/home/ubuntu/website/zanhu/zanhu/news/test/test_views.py”, line 72, in test_get_thread
assert response.status_code == 200
AssertionError
WARNING 2020-11-12 20:29:04,663 log 1114 140198981699392 Bad Request: /news/like/
Failure
Traceback (most recent call last):
File “/home/ubuntu/website/zanhu/zanhu/news/test/test_views.py”, line 62, in test_like_news
assert response.status_code == 200
AssertionError
WARNING 2020-11-12 20:29:05,127 log 1114 140198981699392 Bad Request: /news/post-comment/
Failure
Traceback (most recent call last):
File “/home/ubuntu/website/zanhu/zanhu/news/test/test_views.py”, line 87, in test_post_comments
assert response.status_code == 200
AssertionError
Destroying test database for alias ‘default’…
Process finished with exit code 1