Really test named cursors in test_scroll_named()

This commit is contained in:
Daniele Varrazzo 2013-10-16 19:09:51 +01:00
parent 5c99d2a456
commit 2e3833f7fb

View File

@ -402,7 +402,7 @@ class CursorTests(ConnectingTestCase):
@skip_before_postgres(8, 0)
def test_scroll_named(self):
cur = self.conn.cursor()
cur = self.conn.cursor('tmp', scrollable=True)
cur.execute("select generate_series(0,9)")
cur.scroll(2)
self.assertEqual(cur.fetchone(), (2,))
@ -412,8 +412,6 @@ class CursorTests(ConnectingTestCase):
self.assertEqual(cur.fetchone(), (8,))
cur.scroll(9, mode='absolute')
self.assertEqual(cur.fetchone(), (9,))
self.assertRaises((IndexError, psycopg2.ProgrammingError),
cur.scroll, 10, mode='absolute')
def test_suite():