Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_incorrect_data(self):
- self.client.login(username='questionnaire_user', password='1234567')
- url = reverse('test_philanthropy')
- response = self.client.get(url)
- first_question = Question.objects.get(position=1)
- first_answer = PossibleAnswer.objects.get(position=3, question=first_question)
- post_data = {
- 'questionnaire_wizard-current_step': '1',
- }
- response = self.client.post(url, post_data)
- self.assertEqual(response.status_code, 200)
- self.assertContains(response, 'Це поле обов'язкове.')
Add Comment
Please, Sign In to add comment