configure test environment

This commit is contained in:
dandds 2018-08-02 16:20:54 -04:00
parent 8ec27cbb31
commit 649ac89e2e
4 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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"