Test connection_pooling failed (AssertionError)

my code for setting maximum pool size as 50 is
db = g._database = MongoClient(MFLIX_DB_URI, maxPoolSize = 50)[MFLIX_DB_NAME]

but when I perform testing, It got error as…

client = <FlaskClient <Flask 'mflix.factory'>>
**@pytest.mark.connection_pooling**
**def test_max_pool_size(client):**
**(pool_size, _, _) = get_configuration()**
**> assert pool_size == 50**
**E AssertionError: assert Database(MongoClient(host=['ac-lmusr3y-shard-00-01.9cmxdc7.mongodb.net:27017', 'ac-lmusr3y-shard-00-02.9cmxdc7.mongodb...False, connect=True, authsource='admin', replicaset='atlas-3gbrlw-shard-0', tls=True, maxpoolsize=50), 'max_pool_size') == 50**
**tests/test_connection_pooling.py** :14: AssertionError

I don’t know what’s wrong

Please help me find the solution, Thank you


Hey @dbothsamitti,

Apologies for late reply. Can you please try the solution given in this post:

Regards,
Satyam