diff --git a/SAS/TMSS/test/tmss_database_unittest_setup.py b/SAS/TMSS/test/tmss_database_unittest_setup.py
index adc9193ff72ab130c86629968b9d605c5170555e..812464c3e911c5c024524a330c163cfc72a091f5 100644
--- a/SAS/TMSS/test/tmss_database_unittest_setup.py
+++ b/SAS/TMSS/test/tmss_database_unittest_setup.py
@@ -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.
diff --git a/SAS/TMSS/test/tmss_test_environment_unittest_setup.py b/SAS/TMSS/test/tmss_test_environment_unittest_setup.py
index 98375bb80e3b66b19320ef3c129d4757f1bbc7b6..a8c658c962f9f0fd8b9aad85e6f7360ba78ce3b5 100644
--- a/SAS/TMSS/test/tmss_test_environment_unittest_setup.py
+++ b/SAS/TMSS/test/tmss_test_environment_unittest_setup.py
@@ -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__)