Django

Code

Show
Ignore:
Timestamp:
03/19/08 14:11:51 (10 months ago)
Author:
jacob
Message:

Replaced dict reprs in tests with explicit looks at each key. This should fix many spurious test failures on other VMs (first noticed on Jython).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/modeltests/lookup/models.py

    r5876 r7322  
    7777# in_bulk() takes a list of IDs and returns a dictionary mapping IDs 
    7878# to objects. 
    79 >>> Article.objects.in_bulk([1, 2]) 
    80 {1: <Article: Article 1>, 2: <Article: Article 2>} 
     79>>> arts = Article.objects.in_bulk([1, 2]) 
     80>>> arts[1] 
     81<Article: Article 1> 
     82>>> arts[2] 
     83<Article: Article 2> 
    8184>>> Article.objects.in_bulk([3]) 
    8285{3: <Article: Article 3>}