MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_custom

Method test_custom

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

Source from the content-addressed store, hash-verified

683 )
684
685 def test_custom(self):
686 dbapi = MockDBAPI(
687 foober=12, lala=18, hoho={"this": "dict"}, fooz="somevalue"
688 )
689
690 def connect():
691 return dbapi.connect(
692 foober=12, lala=18, fooz="somevalue", hoho={"this": "dict"}
693 )
694
695 # start the postgresql dialect, but put our mock DBAPI as the
696 # module instead of psycopg
697
698 e = create_engine(
699 "postgresql+psycopg2://",
700 creator=connect,
701 module=dbapi,
702 _initialize=False,
703 )
704 e.connect()
705
706 def test_recycle(self):
707 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