From cb054e2863f871889d9719c320b31990664a5b59 Mon Sep 17 00:00:00 2001
From: Auke Klazema <klazema@astron.nl>
Date: Mon, 25 Mar 2019 09:56:16 +0000
Subject: [PATCH] SW-609: Fix Exception.message issue in t_trigger_service.py

---
 SAS/TriggerServices/test/t_trigger_service.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SAS/TriggerServices/test/t_trigger_service.py b/SAS/TriggerServices/test/t_trigger_service.py
index 23f3efc3ae4..97d3eb2050a 100644
--- a/SAS/TriggerServices/test/t_trigger_service.py
+++ b/SAS/TriggerServices/test/t_trigger_service.py
@@ -140,7 +140,7 @@ class TestALERTHandler(unittest.TestCase):
 
             with self.assertRaises(Exception) as err:
                 self.handler.handle_event(self.voevent_xml, self.voevent_etree)
-            self.assertTrue('exceeded' in err.exception.message)
+            self.assertTrue('exceeded' in str(err.exception))
 
     def test_voevent_not_authorized_should_raise_exception(self):
         with mock.patch('lofar.triggerservices.trigger_service.momqueryrpc') as momrpc:
@@ -149,7 +149,7 @@ class TestALERTHandler(unittest.TestCase):
 
             with self.assertRaises(Exception) as err:
                 self.handler.handle_event(self.voevent_xml, self.voevent_etree)
-            self.assertTrue('not allowed' in err.exception.message)
+            self.assertTrue('not allowed' in str(err.exception))
 
 
 if __name__ == '__main__':
-- 
GitLab