From b705b2d500413db8b6ffd516caebead627d35d93 Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Mon, 27 Jan 2020 08:56:24 +0100
Subject: [PATCH] TMSS-139: logging

---
 SAS/TMSS/test/t_tmssapp_scheduling_django.py    | 9 +++++++++
 SAS/TMSS/test/t_tmssapp_specification_django.py | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/SAS/TMSS/test/t_tmssapp_scheduling_django.py b/SAS/TMSS/test/t_tmssapp_scheduling_django.py
index 9d01c50e5c8..ce25ece5ddc 100755
--- a/SAS/TMSS/test/t_tmssapp_scheduling_django.py
+++ b/SAS/TMSS/test/t_tmssapp_scheduling_django.py
@@ -19,10 +19,16 @@
 
 # $Id:  $
 
+import os
 import unittest
 from datetime import datetime
 # use this to create timezone-aware datetime objects: from django.utils import timezone
 
+import logging
+logger = logging.getLogger(__name__)
+logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.DEBUG)
+
+
 # todo: Tags? -> Decide how to deal with them first.
 # todo: Immutability of Blueprints on db level?
 
@@ -938,3 +944,6 @@ class DataproductHashTest(unittest.TestCase):
     #     assertDataWithUrls(self, response2.data, DataproductHash_test_data())
 
 
+if __name__ == "__main__":
+    os.environ['TZ'] = 'UTC'
+    unittest.main()
diff --git a/SAS/TMSS/test/t_tmssapp_specification_django.py b/SAS/TMSS/test/t_tmssapp_specification_django.py
index caf1c591afd..46e7d80c193 100755
--- a/SAS/TMSS/test/t_tmssapp_specification_django.py
+++ b/SAS/TMSS/test/t_tmssapp_specification_django.py
@@ -19,10 +19,15 @@
 
 # $Id:  $
 
+import os
 import unittest
 from datetime import datetime
 import uuid
 
+import logging
+logger = logging.getLogger(__name__)
+logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.DEBUG)
+
 # todo: Tags? -> Decide how to deal with them first.
 # todo: Immutability of Blueprints on db level?
 
@@ -1554,3 +1559,7 @@ class TaskRelationBlueprintTest(unittest.TestCase):
     #     response = client.get('/task_blueprint/%s/task_relation_blueprint/%s/' % (task_blueprint_2.id, task_relation_blueprint_1.id), format='json', follow=True)
     #     self.assertEqual(response.status_code, 404)
     #
+
+if __name__ == "__main__":
+    os.environ['TZ'] = 'UTC'
+    unittest.main()
-- 
GitLab