Skip to content

Commit

Permalink
Fixed unit-test output error in m2m_and_m2o unit tests, due to a chan…
Browse files Browse the repository at this point in the history
…ge in the model's __repr__ earlier today

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Jun 1, 2006
1 parent cb9cb20 commit 8ac9bb7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/modeltests/m2m_and_m2o/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ class Meta:
>>> i3.cc.add(r)
>>> from django.db.models.query import Q
>>> Issue.objects.filter(client=r.id)
[<Issue 1>, <Issue 2>]
[<Issue: 1>, <Issue: 2>]
>>> Issue.objects.filter(client=g.id)
[<Issue 3>]
[<Issue: 3>]
>>> Issue.objects.filter(cc__id__exact=g.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.
# 3 ways of saying the same thing:
>>> 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 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 1>, <Issue 2>, <Issue 3>]
[<Issue: 1>, <Issue: 2>, <Issue: 3>]
"""

0 comments on commit 8ac9bb7

Please sign in to comment.