Commit 9bed0325 by Alex Gaynor

Fixed handling of custom primary keys.

parent 903093c5
from taggit.tests.tests import (TaggableManagerTestCase, TaggableFormTestCase, from taggit.tests.tests import (TaggableManagerTestCase, TaggableFormTestCase,
TaggableManagerDirectTestCase, TaggableManagerDirectTestCase, TaggableFormDirectTestCase,
TaggableFormDirectTestCase, TaggableManagerCustomPKTestCase, TaggableFormCustomPKTestCase)
TaggableManagerCustomPKTestCase,
TaggableFormCustomPKTestCase)
...@@ -2,10 +2,8 @@ from django.test import TestCase ...@@ -2,10 +2,8 @@ from django.test import TestCase
from taggit.models import Tag, TaggedItem from taggit.models import Tag, TaggedItem
from taggit.tests.forms import FoodForm, DirectFoodForm, CustomPKFoodForm from taggit.tests.forms import FoodForm, DirectFoodForm, CustomPKFoodForm
from taggit.tests.models import (Food, Pet, HousePet, from taggit.tests.models import (Food, Pet, HousePet, DirectFood, DirectPet,
DirectFood, DirectPet, DirectHousePet, DirectHousePet, TaggedPet, CustomPKFood, CustomPKPet, CustomPKHousePet,
TaggedPet,
CustomPKFood, CustomPKPet, CustomPKHousePet,
TaggedCustomPKPet) TaggedCustomPKPet)
...@@ -166,8 +164,8 @@ class TaggableManagerCustomPKTestCase(TaggableManagerTestCase): ...@@ -166,8 +164,8 @@ class TaggableManagerCustomPKTestCase(TaggableManagerTestCase):
taggeditem_model = TaggedCustomPKPet taggeditem_model = TaggedCustomPKPet
def test_require_pk(self): def test_require_pk(self):
# XXX with a charfield pk, pk is never None, so taggit has no # TODO with a charfield pk, pk is never None, so taggit has no way to
# way to tell if the instance is saved or not # tell if the instance is saved or not
pass pass
class TaggableFormTestCase(BaseTaggingTest): class TaggableFormTestCase(BaseTaggingTest):
......
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