def test_default_port_config(mock_connect): config = deepcopy(CACTI_CONFIG) cacti = CactiCheck('cacti', {}, [config]) connection = cacti._get_connection() assert connection.port == 3306
def test_port_config_custom(mock_connect): config = deepcopy(CACTI_CONFIG) config['mysql_port'] = 3308 cacti = CactiCheck('cacti', {}, [config]) connection = cacti._get_connection() assert connection.port == 3308