def test_can_not_save_empty_vote_name(self): vote_ = Vote(vote_name='') with self.assertRaises(ValidationError): vote_.save() vote_.full_clean()