Files
mariadb-connector-python/test/conf_test.py
Georg Richter 9d9fd45f3c Reverted previous fix and fixed getter test in test_pooling.
The previous fix in conf_test.py failed in travis benchmarks
2019-12-17 16:39:20 +01:00

19 lines
558 B
Python

#!/usr/bin/env python -O
# -*- coding: utf-8 -*-
import os
def conf():
d = {
"user": os.environ.get('TEST_USER', 'root'),
"host": os.environ.get('TEST_HOST', 'localhost'),
"database": os.environ.get('TEST_DATABASE', 'testp'),
"port": int(os.environ.get('TEST_PORT', '3306'))
}
if os.environ.get('TEST_RESET_SESSION'):
d["pool_reset_connection"] = int(os.environ.get('TEST_RESET_SESSION', '1'))
if os.environ.get('TEST_PASSWORD'):
d["password"] = os.environ.get('TEST_PASSWORD')
return d