MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_custom

Method test_custom

test/engine/test_parseconnect.py:698–717  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

696 )
697
698 def test_custom(self):
699 dbapi = MockDBAPI(
700 foober=12, lala=18, hoho={"this": "dict"}, fooz="somevalue"
701 )
702
703 def connect():
704 return dbapi.connect(
705 foober=12, lala=18, fooz="somevalue", hoho={"this": "dict"}
706 )
707
708 # start the postgresql dialect, but put our mock DBAPI as the
709 # module instead of psycopg
710
711 e = create_engine(
712 "postgresql+psycopg2://",
713 creator=connect,
714 module=dbapi,
715 _initialize=False,
716 )
717 e.connect()
718
719 def test_recycle(self):
720 dbapi = MockDBAPI(

Callers

nothing calls this directly

Calls 3

create_engineFunction · 0.90
MockDBAPIFunction · 0.70
connectMethod · 0.45

Tested by

no test coverage detected