Django

Code

Changeset 6242

Show
Ignore:
Timestamp:
09/14/07 17:54:58 (1 year ago)
Author:
jacob
Message:

Fixed the test in [6218] which was invalid for psycopg2 and friends -- executemany() shouldn't accept None, just empty lists.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/backends/models.py

    r6220 r6242  
    1818[<Square: -5 ** 2 == 25>, <Square: -4 ** 2 == 16>, <Square: -3 ** 2 == 9>, <Square: -2 ** 2 == 4>, <Square: -1 ** 2 == 1>, <Square: 0 ** 2 == 0>, <Square: 1 ** 2 == 1>, <Square: 2 ** 2 == 4>, <Square: 3 ** 2 == 9>, <Square: 4 ** 2 == 16>, <Square: 5 ** 2 == 25>] 
    1919 
    20 #4765: executemany with params=None or params=[] does nothing 
    21 >>> cursor.executemany('INSERT INTO BACKENDS_SQUARE (ROOT, SQUARE) VALUES (%s, %s)', None) and None or None 
    22 >>> Square.objects.count() 
    23 11 
    24  
     20#4765: executemany with params=[] does nothing 
    2521>>> cursor.executemany('INSERT INTO BACKENDS_SQUARE (ROOT, SQUARE) VALUES (%s, %s)', []) and None or None 
    2622>>> Square.objects.count()