Re: [sqlalchemy] Mock DBAPI connection for testing custom creator

2017-10-18 Thread Mike Bayer
On Wed, Oct 18, 2017 at 9:50 PM, Sam Lee wrote: > Thank you. > I didn't even post stacktrace and those were the exact errors!! because I've gotten them before and I knew from your description what you were seeing, they are very specific to what psycopg2 is doing. > I'll take a look at test/eng

Re: [sqlalchemy] Mock DBAPI connection for testing custom creator

2017-10-18 Thread Sam Lee
Thank you. I didn't even post stacktrace and those were the exact errors!! I'll take a look at test/engine/test_reconnect.py and probably test against Pool directly. What I'm testing is a bit silly cause I'm testing sqlalchemy behavior :P Thanks. Sam On Tue, Oct 17, 2017 at 10:21 PM, Mike Baye

Re: [sqlalchemy] Mock DBAPI connection for testing custom creator

2017-10-17 Thread Mike Bayer
On Tue, Oct 17, 2017 at 4:58 PM, Sam Lee wrote: > Hi, > > I am passing a custom creator to sqlalchemy.create_engine(). > And, I want to simulate the following scenario in automated test without > using actual database connection: > > 1. Request a connection from pool: connects to DB. > 2. DB goes

[sqlalchemy] Mock DBAPI connection for testing custom creator

2017-10-17 Thread Sam Lee
Hi, I am passing a custom creator to sqlalchemy.create_engine(). And, I want to simulate the following scenario in automated test without using actual database connection: 1. Request a connection from pool: connects to DB. 2. DB goes down. 3. Request a connection from pool: connection is invalid