Skip to content
Snippets Groups Projects
Commit cd75b9d5 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-287: indicate (via environment var) that we are using the...

TMSS-287: indicate (via environment var) that we are using the TMSSTestEnvironment during unittesting.
parent 362d4ab2
No related branches found
No related tags found
1 merge request!188TMSS-287: implemented CycleQuota
......@@ -22,6 +22,10 @@ By importing this helper module in your unittest module you get a TMSSTestDataba
which is automatically destroyed at the end of the unittest session.
'''
# indicate that we're unittesting.
import os
os.environ['TMSS_UNIT_TESTING'] = str(True)
# before we import any django modules the DJANGO_SETTINGS_MODULE and TMSS_DBCREDENTIALS need to be known/set.
# import and start an isolated TMSSTestDatabaseInstance (with fresh database)
# this automagically sets the required DJANGO_SETTINGS_MODULE and TMSS_DBCREDENTIALS envvars.
......
......@@ -22,6 +22,10 @@ By importing this helper module in your unittest module you get a TMSSTestDataba
which is automatically destroyed at the end of the unittest session.
'''
# indicate that we're unittesting.
import os
os.environ['TMSS_UNIT_TESTING'] = str(True)
import logging
logger = logging.getLogger(__name__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment