Exemplo n.º 1
0
 def test_aislug_raises_error_on_empty_string(self):
     f = AISlugField()
     self.assertEqual('', f.clean('', None))
Exemplo n.º 2
0
 def test_aislug_with_choices_cleans_valid_choice(self):
     f = AISlugField(max_length=1, choices=[('a','A'), ('b','B')])
     self.assertEqual('a', f.clean('a', None))