Fixed unit-test output error in m2m_and_m2o unit tests, due to a change in the model's __repr__ earlier today
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
cb9cb2045b
commit
8ac9bb7ddf
|
@ -47,20 +47,20 @@ API_TESTS = """
|
||||||
>>> i3.cc.add(r)
|
>>> i3.cc.add(r)
|
||||||
>>> from django.db.models.query import Q
|
>>> from django.db.models.query import Q
|
||||||
>>> Issue.objects.filter(client=r.id)
|
>>> Issue.objects.filter(client=r.id)
|
||||||
[<Issue 1>, <Issue 2>]
|
[<Issue: 1>, <Issue: 2>]
|
||||||
>>> Issue.objects.filter(client=g.id)
|
>>> Issue.objects.filter(client=g.id)
|
||||||
[<Issue 3>]
|
[<Issue: 3>]
|
||||||
>>> Issue.objects.filter(cc__id__exact=g.id)
|
>>> Issue.objects.filter(cc__id__exact=g.id)
|
||||||
[]
|
[]
|
||||||
>>> Issue.objects.filter(cc__id__exact=r.id)
|
>>> Issue.objects.filter(cc__id__exact=r.id)
|
||||||
[<Issue 2>, <Issue 3>]
|
[<Issue: 2>, <Issue: 3>]
|
||||||
|
|
||||||
# Queries that combine results from the m2m and the m2o relationship.
|
# Queries that combine results from the m2m and the m2o relationship.
|
||||||
# 3 ways of saying the same thing:
|
# 3 ways of saying the same thing:
|
||||||
>>> Issue.objects.filter(Q(cc__id__exact=r.id) | Q(client=r.id))
|
>>> Issue.objects.filter(Q(cc__id__exact=r.id) | Q(client=r.id))
|
||||||
[<Issue 1>, <Issue 2>, <Issue 3>]
|
[<Issue: 1>, <Issue: 2>, <Issue: 3>]
|
||||||
>>> Issue.objects.filter(cc__id__exact=r.id) | Issue.objects.filter(client=r.id)
|
>>> Issue.objects.filter(cc__id__exact=r.id) | Issue.objects.filter(client=r.id)
|
||||||
[<Issue 1>, <Issue 2>, <Issue 3>]
|
[<Issue: 1>, <Issue: 2>, <Issue: 3>]
|
||||||
>>> Issue.objects.filter(Q(client=r.id) | Q(cc__id__exact=r.id))
|
>>> Issue.objects.filter(Q(client=r.id) | Q(cc__id__exact=r.id))
|
||||||
[<Issue 1>, <Issue 2>, <Issue 3>]
|
[<Issue: 1>, <Issue: 2>, <Issue: 3>]
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue