mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
Fix name of lobject keyword argument
This commit is contained in:
parent
4b4d2796b7
commit
38cd720369
|
@ -938,7 +938,7 @@ psyco_conn_lobject(connectionObject *self, PyObject *args, PyObject *keywds)
|
|||
PyObject *obj;
|
||||
|
||||
static char *kwlist[] = {"oid", "mode", "new_oid", "new_file",
|
||||
"cursor_factory", NULL};
|
||||
"lobject_factory", NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|IzIzO", kwlist,
|
||||
&oid, &smode, &new_oid, &new_file,
|
||||
|
|
|
@ -382,6 +382,13 @@ class LargeObjectTests(LargeObjectTestCase):
|
|||
except psycopg2.OperationalError:
|
||||
pass
|
||||
|
||||
def test_factory(self):
|
||||
class lobject_subclass(psycopg2.extensions.lobject):
|
||||
pass
|
||||
|
||||
lo = self.conn.lobject(lobject_factory=lobject_subclass)
|
||||
self.assertIsInstance(lo, lobject_subclass)
|
||||
|
||||
decorate_all_tests(LargeObjectTests, skip_if_no_lo, skip_lo_if_green)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user