Skip to content

Add IS_UNIT_TEST_ENV which is required by conditional opensearch document setup #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ When programming for openIMIS backend, you are highly encouraged to use the feat
- within `openimis-be_py` directory
- install openIMIS (external) dependencies: `pip install -r requirements.txt`. For development workstations, one can use `pip install -r dev-requirements.txt` instead, for more modules.
- In the script directory,
- generate the openIMIS modules dependencies file (from openimis.json config): `python modules-requirements.py openimis.json > modules-requirements.txt`
- generate the openIMIS modules dependencies file (from openimis.json config): `python modules-requirements.py ../openimis.json > modules-requirements.txt`
- if you previously installed openIMIS on another version, it seems safe to uninstall all previous modules-requirement to be sure it match current version `pip uninstall -r modules-requirements.txt`
- install openIMIS current modules: `pip install -r modules-requirements.txt`
- Copy the example environment setup and adjust the settings (like database connection): `cp .env.example .env`.
Expand Down
3 changes: 3 additions & 0 deletions openIMIS/openIMIS/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import logging
import os
import sys

from ..openimisapps import openimis_apps, get_locale_folders
from datetime import timedelta
Expand Down Expand Up @@ -194,3 +195,5 @@ def SITE_URL():
# By default, the maximum upload size is 2.5Mb, which is a bit short for base64 picture upload
DATA_UPLOAD_MAX_MEMORY_SIZE = int(os.environ.get('DATA_UPLOAD_MAX_MEMORY_SIZE', 10 * 1024 * 1024))


IS_UNIT_TEST_ENV = 'test' in sys.argv
Loading