[Answered ]-Testing page content after redirect not working

2๐Ÿ‘

โœ…

  1. You can use follow=True in your client.post which will emulate the browser following the redirect to the next page. See here in the docs. That will allow you to test the second pageโ€™s content with assertContains.

  2. You can use assertRedirects to test that the redirect happens properly. Check that out here in the docs.

๐Ÿ‘คYPCrumble

Leave a comment