configure test environment
This commit is contained in:
parent
8ec27cbb31
commit
649ac89e2e
@ -72,6 +72,12 @@ To log in as one of them, navigate to `/login-dev?username=<lowercase name>`. Fo
|
||||
|
||||
## Testing
|
||||
|
||||
Tests require a test database:
|
||||
|
||||
```
|
||||
createdb atat_test
|
||||
```
|
||||
|
||||
To run lint, static analysis, and unit tests:
|
||||
|
||||
script/test
|
||||
|
@ -12,7 +12,7 @@ from atst.routes.workspaces import bp as workspace_routes
|
||||
from atst.routes.requests import requests_bp
|
||||
|
||||
|
||||
ENV = os.getenv("TORNADO_ENV", "dev")
|
||||
ENV = os.getenv("FLASK_ENV", "dev")
|
||||
|
||||
|
||||
def make_app(config):
|
||||
|
@ -11,7 +11,7 @@ def navigationContext(self):
|
||||
|
||||
|
||||
def dev(self):
|
||||
return os.getenv("TORNADO_ENV", "dev") == "dev"
|
||||
return os.getenv("FLASK_ENV", "dev") == "dev"
|
||||
|
||||
|
||||
def matchesPath(self, href):
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
source "$(dirname "${0}")"/../script/include/global_header.inc.sh
|
||||
|
||||
export FLASK_ENV=test
|
||||
|
||||
# Define all relevant python files and directories for this app
|
||||
PYTHON_FILES="./app.py ./atst ./config"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user