Skip to content
Snippets Groups Projects
Commit c7561623 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-609: Fix Exception.message issue in t_voevent_decider.py

parent 9346921f
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ class TestVOEventDecider(unittest.TestCase):
self.voevent.attrib['role'] = 'utility' # pretend it's a real event
with self.assertRaises(ValueError) as err:
self.alertdecider.is_acceptable(self.voevent)
self.assertTrue('past' in err.exception.message)
self.assertTrue('past' in str(err.exception))
def test_ALERTDecider_raises_ValueError_on_futuristic_event(self):
self.voevent.attrib['role'] = 'utility' # pretend it's a real event
......@@ -52,7 +52,7 @@ class TestVOEventDecider(unittest.TestCase):
isotime.text = (datetime.datetime.utcnow() + datetime.timedelta(minutes=35)).isoformat()
with self.assertRaises(ValueError) as err:
self.alertdecider.is_acceptable(self.voevent)
self.assertTrue('future' in err.exception.message)
self.assertTrue('future' in str(err.exception))
def test_ALERTDecider_accepts_live_event_in_near_future(self):
self.voevent.attrib['role'] = 'utility' # pretend it's a real event
......
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