def test_check_connect(self):
        """
        Tests connectivity to the db server. Requires the db server to be
        running.
        """
        client = mongoengine.connection.get_connection()

        expected_str = "host=['%s:%s']" % (
            cfg.CONF.database.host,
            cfg.CONF.database.port,
        )
        self.assertIn(expected_str, str(client), "Not connected to desired host.")

        Tests connectivity to the db server. Requires the db server to be
        running.
        
st2common/tests/unit/test_db.py