Commit 549b33f1 by Luke Pomfrey

Add get_internal_type to TaggableManager for #285

parent ed8af524
......@@ -298,6 +298,9 @@ class TaggableManager(RelatedField, Field):
else:
self.post_through_setup(cls)
def get_internal_type(self):
return 'ManyToManyField'
def __lt__(self, other):
"""
Required contribute_to_class as Django uses bisect
......
......@@ -368,6 +368,11 @@ class TaggableManagerTestCase(BaseTaggingTestCase):
'apple': set(['1', '2'])
})
def test_internal_type_is_manytomany(self):
self.assertEqual(
TaggableManager().get_internal_type(), 'ManyToManyField'
)
class TaggableManagerDirectTestCase(TaggableManagerTestCase):
food_model = DirectFood
pet_model = DirectPet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment