How to follow Django redirect using django-pytest?
问题 In setting up a ArchiveIndexView in Django I am able to successfully display a list of items in a model by navigating to the page myself. When going to write the test in pytest to verify navigating to the page "checklist_GTD/archive/" succeeds, the test fails with the message: > assert response.status_code == 200 E assert 301 == 200 E + where 301 = <HttpResponsePermanentRedirect status_code=301, "text/html; charset=utf-8", url="/checklist_GTD/archive/">.status_code test_archive.py:4: