Fixed the test in [6218] which was invalid for psycopg2 and friends -- executemany() shouldn't accept None, just empty lists.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e74880ed22
commit
5af2af3e33
|
@ -17,11 +17,7 @@ __test__ = {'API_TESTS': """
|
||||||
>>> Square.objects.order_by('root')
|
>>> Square.objects.order_by('root')
|
||||||
[<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>]
|
[<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>]
|
||||||
|
|
||||||
#4765: executemany with params=None or params=[] does nothing
|
#4765: executemany with params=[] does nothing
|
||||||
>>> cursor.executemany('INSERT INTO BACKENDS_SQUARE (ROOT, SQUARE) VALUES (%s, %s)', None) and None or None
|
|
||||||
>>> Square.objects.count()
|
|
||||||
11
|
|
||||||
|
|
||||||
>>> cursor.executemany('INSERT INTO BACKENDS_SQUARE (ROOT, SQUARE) VALUES (%s, %s)', []) and None or None
|
>>> cursor.executemany('INSERT INTO BACKENDS_SQUARE (ROOT, SQUARE) VALUES (%s, %s)', []) and None or None
|
||||||
>>> Square.objects.count()
|
>>> Square.objects.count()
|
||||||
11
|
11
|
||||||
|
|
Loading…
Reference in New Issue