Merge branch 'dev' into rrt/dev

This commit is contained in:
Aaron Louie 2020-06-17 11:11:39 -04:00
commit 769bdbeb46
3 changed files with 3 additions and 9 deletions

View File

@ -1,15 +1,9 @@
FROM python:3.7-slim
FROM sartography/cr-connect-python-base
WORKDIR /app
COPY Pipfile Pipfile.lock /app/
RUN set -xe \
&& pip install pipenv \
&& apt-get update -q \
&& apt-get install -y -q \
gcc python3-dev libssl-dev \
curl postgresql-client git-core \
gunicorn3 postgresql-client \
&& pipenv install --dev \
&& apt-get remove -y gcc python3-dev libssl-dev \
&& apt-get autoremove -y \

View File

@ -12,7 +12,7 @@ CORS_ALLOW_ORIGINS = re.split(r',\s*', environ.get('CORS_ALLOW_ORIGINS', default
TESTING = environ.get('TESTING', default="false") == "true"
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true")
TEST_UID = environ.get('TEST_UID', default="dhf8r")
ADMIN_UIDS = re.split(r',\s*', environ.get('ADMIN_UIDS', default="dhf8r,ajl2j,cah13us,cl3wf"))
ADMIN_UIDS = re.split(r',\s*', environ.get('ADMIN_UIDS', default="dhf8r,ajl2j,cah3us,cl3wf"))
# Sentry flag
ENABLE_SENTRY = environ.get('ENABLE_SENTRY', default="false") == "true"

View File

@ -24,7 +24,7 @@ class LdapService(object):
@staticmethod
def __get_conn():
if not LdapService.conn:
if app.config['TESTING']:
if app.config['TESTING'] or app.config['LDAP_URL'] == 'mock':
server = Server('my_fake_server')
conn = Connection(server, client_strategy=MOCK_SYNC)
file_path = os.path.abspath(os.path.join(app.root_path, '..', 'tests', 'data', 'ldap_response.json'))