Guest User

Untitled

a guest
Aug 15th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def test_incorrect_data(self):
  2.  
  3. self.client.login(username='questionnaire_user', password='1234567')
  4. url = reverse('test_philanthropy')
  5. response = self.client.get(url)
  6.  
  7. first_question = Question.objects.get(position=1)
  8. first_answer = PossibleAnswer.objects.get(position=3, question=first_question)
  9.  
  10. post_data = {
  11. 'questionnaire_wizard-current_step': '1',
  12. }
  13.  
  14. response = self.client.post(url, post_data)
  15.  
  16. self.assertEqual(response.status_code, 200)
  17. self.assertContains(response, 'Це поле обов'язкове.')
Add Comment
Please, Sign In to add comment