Ensure env vars are set for test environment

This commit is contained in:
Luke Else 2024-01-21 22:40:31 +00:00
parent bca3b0a663
commit 17cb908753
3 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,6 @@
variables:
ENVIRON: "test"
pytest: pytest:
stage: test stage: test
script: script:

View File

@ -0,0 +1,4 @@
import os
# Setup test environment variables
os.environ["ENVIRON"] = "test"

View File

@ -1,8 +1,3 @@
# Ensure test environment is set before using # Ensure test environment is set before using
import scripts.create_database
import os
# Setup test environment variables
os.environ["ENVIRON"] = "test"
# Runs the database creation scripts # Runs the database creation scripts
import scripts.create_database