Merge branch 'e2eTesting' of https://mygit.wmg.warwick.ac.uk/u5500327/wmgzon into e2eTesting

This commit is contained in:
2024-02-24 14:09:34 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ def create_connection(path: str, filename: str):
print("Table creation complete")
# Populate with test data if we are in Test Mode
if os.environ.get("ENVIRON") == "test":
if os.environ.get("ENVIRON", "test") == "test":
sql = open("scripts/test_data.sql", "r")
conn.executescript(sql.read())
@ -43,7 +43,7 @@ def run():
db_name = r"wmgzon.db"
# Check for test environ
if os.environ.get("ENVIRON") == "test":
if os.environ.get("ENVIRON", "test") == "test":
# Remove the original test database
print("TEST ENVIRONMENT ACTIVE")
db_name = "test_" + db_name