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,11 +2,9 @@ from django.test import TestCase ...@@ -2,11 +2,9 @@ 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, TaggedCustomPKPet)
CustomPKFood, CustomPKPet, CustomPKHousePet,
TaggedCustomPKPet)
class BaseTaggingTest(TestCase): class BaseTaggingTest(TestCase):
...@@ -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