def test_register_connection(self):
        register_connection('testdb', 'mongoenginetest2')

        self.assertRaises(ConnectionError, get_connection)
        conn = get_connection('testdb')
        self.assertTrue(isinstance(conn, pymongo.mongo_client.MongoClient))

        db = get_db('testdb')
        self.assertTrue(isinstance(db, pymongo.database.Database))
        self.assertEqual(db.name, 'mongoenginetest2')
Renders the contents of this tag as a Unicode string.
dataset/ETHPy150Open MongoEngine/mongoengine/tests/test_connection.py/ConnectionTest.test_register_connection--crossover with--dataset/ETHPy150Open mtlevolio/pylinkchecker/pylinkchecker/bs4/element.py/Tag.decode_contents