def test_can_not_save_empty_text(self): poll = Poll(text='') with self.assertRaises(ValidationError): poll.full_clean()