Permalink
Browse files

Remove defunct tests and fix a typo

  • Loading branch information...
1 parent 22364f5 commit 4940508445b761d88115e1c9c32ac8edb54cd566 Dan Fairs committed Nov 19, 2010
Showing with 1 addition and 17 deletions.
  1. +1 −17 dfk/tests.py
View
@@ -47,12 +47,6 @@ def test_abstract(self):
class DeferredModelA(models.Model):
user = DeferredForeignKey()
-class DeferredModelB(models.Model):
- content = DeferredForeignKey(name='content_reference')
-
-class DeferredModelC(models.Model):
- content = DeferredForeignKey(name='content_reference')
-
# Point DeferredModelA's 'user' dfk to ModelA
point(DeferredModelA, 'user', ModelA)
@@ -65,19 +59,9 @@ def test_specific_field(self):
a = DeferredModelA.objects.create(
user=m
)
- x = DeferredModelA.objects.get(pk=a.pk)
+ x = DeferredModelA.objects.get(pk=a.pk).user
self.assertEqual(m, x)
- def test_class(self):
- # Check that processing a whole class of deferred fields
- # works as expected
- t = ModelC.objects.create()
- b = DeferredModelB.objects.create(content=t)
- c = DeferredModelC.objects.create(content=t)
-
- self.assertEqual(t, DeferredModelB.objects.get(pk=b.pk).content)
- self.assertEqual(t, DeferredModelC.objects.get(pk=c.pk).content)
-
def test_duplicate(self):
# Attempting to point a dfk to a different target once
# it's already been set should raise an error

0 comments on commit 4940508

Please sign in to comment.