Kaydet (Commit) 309c10c2 authored tarafından Tim Graham's avatar Tim Graham Kaydeden (comit) GitHub

Refs #20094 -- Removed obsolete tests/utils_tests/test_itercompat.py

The is_iterator() function was removed in 2456ffa4.
üst 8f50ca11
......@@ -4,14 +4,6 @@ from django.db import models
class Category(models.Model):
name = models.CharField(max_length=100)
def next(self):
return self
class Thing(models.Model):
name = models.CharField(max_length=100)
category = models.ForeignKey(Category, models.CASCADE)
class CategoryInfo(models.Model):
category = models.OneToOneField(Category, models.CASCADE)
from django.test import TestCase
from .models import Category, Thing
class TestIsIterator(TestCase):
def test_regression(self):
"""This failed on Django 1.5/Py2.6 because category has a next method."""
category = Category.objects.create(name='category')
Thing.objects.create(category=category)
Thing.objects.filter(category=category)
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 to comment