Skip to content

Commit

Permalink
Fix doctests on Django@master: Adapt to change of QuerySet.__repr__
Browse files Browse the repository at this point in the history
File "...", line 1571, in ...
Failed example:
    jack.get_descendants()
Expected:
    [<Person: Jill>, <Person: Jim>]
Got:
    <QuerySet [<Person: Jill>, <Person: Jim>]>
  • Loading branch information
matthiask committed Dec 19, 2015
1 parent 68b673b commit 825b302
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/myapp/doctests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1568,26 +1568,26 @@ ValueError: Cannot insert a node which has already been saved.
8 4 2 1 8 9

>>> jack = Person.objects.get(pk=1)
>>> jack.get_descendants()
>>> list(jack.get_descendants())
[<Person: Jill>, <Person: Jim>]
>>> jack.get_root()
<Person: Jack>
>>> jill = Person.objects.get(pk=3)
>>> jill.get_root()
<Person: Jack>
>>> jess = Student.objects.get(pk=4)
>>> jess.get_descendants()
>>> list(jess.get_descendants())
[<Person: Jeff>, <Person: Jane>, <Person: Joe>, <Person: Julie>]
>>> jess.get_root()
<Person: Jess>
>>> jeff = Person.objects.get(pk=5)
>>> jeff.get_descendants()
>>> list(jeff.get_descendants())
[<Person: Jane>, <Person: Joe>]
>>> jeff.get_root()
<Person: Jess>
>>> jane = Student.objects.get(pk=6)
>>> jane.get_root()
<Person: Jess>
>>> jane.get_ancestors()
>>> list(jane.get_ancestors())
[<Person: Jess>, <Person: Jeff>]

0 comments on commit 825b302

Please sign in to comment.