Browse Source

Python tests not updating DB

msmith-techempower 10 years ago
parent
commit
a6c1f4092d

+ 1 - 1
frameworks/Python/bottle/app.py

@@ -20,7 +20,7 @@ if sys.version_info[0] == 3:
 _is_pypy = hasattr(sys, 'pypy_version_info')
 
 DBDRIVER = 'mysql+pymysql' if _is_pypy else 'mysql'
-DBHOSTNAME = os.environ.get('TFB_DATABASE_HOST', 'localhost')
+DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
 DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
 
 app = Bottle()

+ 1 - 1
frameworks/Python/django/hello/hello/settings.py

@@ -17,7 +17,7 @@ DATABASES = {
         'NAME': 'hello_world',           # Or path to database file if using sqlite3.
         'USER': 'benchmarkdbuser',       # Not used with sqlite3.
         'PASSWORD': 'benchmarkdbpass',   # Not used with sqlite3.
-        'HOST': os.environ.get('TFB_DATABASE_HOST', ''),  # Set to empty string for localhost. Not used with sqlite3.
+        'HOST': os.environ.get('DBHOST', ''),  # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
         'CONN_MAX_AGE': 30,
     }

+ 1 - 1
frameworks/Python/flask/app.py

@@ -14,7 +14,7 @@ from sqlalchemy import create_engine
 if sys.version_info[0] == 3:
     xrange = range
 
-DBHOST = os.environ.get('TFB_DATABASE_HOST', 'localhost')
+DBHOST = os.environ.get('DBHOST', 'localhost')
 
 try:
     import MySQLdb

+ 1 - 1
frameworks/Python/pyramid/frameworkbenchmarks/models.py

@@ -11,7 +11,7 @@ from sqlalchemy.orm import sessionmaker
 from sqlalchemy.pool import QueuePool
 from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta
 
-DBHOSTNAME = os.environ.get('TFB_DATABASE_HOST', 'localhost')
+DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
 
 def get_conn():
     return psycopg2.connect(