blob: 02d3463370b632bc2908f1a4f977e8609e27f00f (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
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)
|