MCPcopy Create free account
hub / github.com/MongoEngine/mongoengine / test_connection_kwargs

Method test_connection_kwargs

tests/test_connection.py:550–559  ·  view source on GitHub ↗

Ensure that connection kwargs get passed to pymongo.

(self)

Source from the content-addressed store, hash-verified

548 assert isinstance(conn, pymongo.mongo_client.MongoClient)
549
550 def test_connection_kwargs(self):
551 """Ensure that connection kwargs get passed to pymongo."""
552 connect("mongoenginetest", alias="t1", tz_aware=True)
553 conn = get_connection("t1")
554
555 assert get_tz_awareness(conn)
556
557 connect("mongoenginetest2", alias="t2")
558 conn = get_connection("t2")
559 assert not get_tz_awareness(conn)
560
561 def test_connection_pool_via_kwarg(self):
562 """Ensure we can specify a max connection pool size using

Callers

nothing calls this directly

Calls 3

connectFunction · 0.90
get_connectionFunction · 0.90
get_tz_awarenessFunction · 0.85

Tested by

no test coverage detected