Skip to content

Commit e0f7dd0

Browse files
committed
Tests need to be brought up to date
1 parent d4eaf3f commit e0f7dd0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from unittest import TestCase
66

77
from postgres import Postgres, TooFew, TooMany
8-
from psycopg2.extras import NamedTupleCursor
8+
from psycopg2.extras import RealDictCursor
99
from psycopg2 import InterfaceError, ProgrammingError
1010

1111

@@ -18,7 +18,7 @@
1818
class WithSchema(TestCase):
1919

2020
def setUp(self):
21-
self.db = Postgres(DATABASE_URL)
21+
self.db = Postgres(DATABASE_URL, cursor_factory=RealDictCursor)
2222
self.db.run("DROP SCHEMA IF EXISTS public CASCADE")
2323
self.db.run("CREATE SCHEMA public")
2424

@@ -215,7 +215,7 @@ def test_get_connection_gets_a_connection(self):
215215
class TestCursorFactory(WithData):
216216

217217
def setUp(self): # override
218-
self.db = Postgres(DATABASE_URL, cursor_factory=NamedTupleCursor)
218+
self.db = Postgres(DATABASE_URL)
219219
self.db.run("DROP SCHEMA IF EXISTS public CASCADE")
220220
self.db.run("CREATE SCHEMA public")
221221
self.db.run("CREATE TABLE foo (bar text)")

0 commit comments

Comments
 (0)