class Meta: model = models.EventLog allowed_char = SocialNetworks.get_max_char() widgets = { 'msg': Textarea(attrs={'cols': math.ceil(allowed_char / 2.0), 'rows': 2, 'maxlength': allowed_char}) }
class Meta: model = models.Event allowed_char = SocialNetworks.get_max_char() widgets = { 'services': CheckboxSelectMultiple(), 'msg': Textarea(attrs={'cols': math.ceil(allowed_char / 2.0), 'rows': 2, 'maxlength': allowed_char}) }
def test_11_get_max_char_ok(self): sn = SocialNetworks() self.assertEqual(sn.get_max_char(), 42)