Testing whether a Url is giving 500 error or not in Django [duplicate]
问题 This question already has answers here : Django's self.client.login(…) does not work in unit tests (6 answers) Closed 8 months ago . I want to test Urls whether am getting 500 error or not. In normal case where login is not required I get status_code 200 but where login is required, it gives me 302 error. So, how can one test loginrequired and paramterized url in best way. Thank You So I am adding this because someone link that question into duplicate but it is not my answer and why it is not