mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 17:34:08 +03:00
Fixed tests to run with PG 8.3
This commit is contained in:
parent
07e2c6a62f
commit
5fedaa5474
|
@ -433,7 +433,7 @@ class HstoreTestCase(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
register_hstore(conn)
|
register_hstore(conn)
|
||||||
curs = conn.cursor()
|
curs = conn.cursor()
|
||||||
curs.execute("select ''::hstore x")
|
curs.execute("select ''::hstore as x")
|
||||||
self.assertEqual(curs.fetchone()['x'], {})
|
self.assertEqual(curs.fetchone()['x'], {})
|
||||||
finally:
|
finally:
|
||||||
conn.close()
|
conn.close()
|
||||||
|
@ -442,7 +442,7 @@ class HstoreTestCase(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
curs = conn.cursor()
|
curs = conn.cursor()
|
||||||
register_hstore(curs)
|
register_hstore(curs)
|
||||||
curs.execute("select ''::hstore x")
|
curs.execute("select ''::hstore as x")
|
||||||
self.assertEqual(curs.fetchone()['x'], {})
|
self.assertEqual(curs.fetchone()['x'], {})
|
||||||
finally:
|
finally:
|
||||||
conn.close()
|
conn.close()
|
||||||
|
@ -746,7 +746,7 @@ class AdaptTypeTestCase(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
register_composite('type_ii', conn)
|
register_composite('type_ii', conn)
|
||||||
curs = conn.cursor()
|
curs = conn.cursor()
|
||||||
curs.execute("select '(1,2)'::type_ii x")
|
curs.execute("select '(1,2)'::type_ii as x")
|
||||||
self.assertEqual(curs.fetchone()['x'], (1,2))
|
self.assertEqual(curs.fetchone()['x'], (1,2))
|
||||||
finally:
|
finally:
|
||||||
conn.close()
|
conn.close()
|
||||||
|
@ -755,7 +755,7 @@ class AdaptTypeTestCase(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
curs = conn.cursor()
|
curs = conn.cursor()
|
||||||
register_composite('type_ii', conn)
|
register_composite('type_ii', conn)
|
||||||
curs.execute("select '(1,2)'::type_ii x")
|
curs.execute("select '(1,2)'::type_ii as x")
|
||||||
self.assertEqual(curs.fetchone()['x'], (1,2))
|
self.assertEqual(curs.fetchone()['x'], (1,2))
|
||||||
finally:
|
finally:
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user