def test_formfield(self):
    tm = TaggableManager(verbose_name='categories', help_text='Add some categories', blank=True)
    ff = tm.formfield()
    self.assertEqual(ff.label, 'Categories')
    self.assertEqual(ff.help_text, 'Add some categories')
    self.assertEqual(ff.required, False)
    self.assertEqual(ff.clean(''), [])
    tm = TaggableManager()
    ff = tm.formfield()
    self.assertRaises(ValidationError, ff.clean, '')
def test_formfield(self):
    tm = TaggableManager(verbose_name='categories', help_text='Add some categories', blank=True)
    ff = tm.formfield()
    self.assertEqual(ff.label, 'Categories')
    self.assertEqual(ff.help_text, 'Add some categories')
    self.assertEqual(ff.required, False)
    self.assertEqual(ff.clean(), [])
    tm = TaggableManager()
    ff = tm.formfield()
    self.assertRaises(ValidationError, ff.clean, )