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

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

parent d059e724
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,7 @@ class TestIngestEventHandler(CommonLTAStorageDbTest): ...@@ -62,7 +62,7 @@ class TestIngestEventHandler(CommonLTAStorageDbTest):
with self.assertRaises(LookupError) as context: with self.assertRaises(LookupError) as context:
surl = 'srm://foo.bar:1234/fdjsalfja5h43535h3oiu/5u905u3f' surl = 'srm://foo.bar:1234/fdjsalfja5h43535h3oiu/5u905u3f'
handler._schedule_srmurl_for_visit(surl) handler._schedule_srmurl_for_visit(surl)
self.assertTrue('Could not find site' in context.exception.message) self.assertTrue('Could not find site' in str(context.exception))
def test_02_mark_directory_for_a_visit(self): def test_02_mark_directory_for_a_visit(self):
""" Test core method _mark_directory_for_a_visit for all known root dirs. """ Test core method _mark_directory_for_a_visit for all known root dirs.
...@@ -139,7 +139,7 @@ class TestIngestEventHandler(CommonLTAStorageDbTest): ...@@ -139,7 +139,7 @@ class TestIngestEventHandler(CommonLTAStorageDbTest):
with self.assertRaises(LookupError) as context: with self.assertRaises(LookupError) as context:
surl = site['url'] + '/fdjsalfja5h43535h3oiu/5u905u3f' surl = site['url'] + '/fdjsalfja5h43535h3oiu/5u905u3f'
handler._insert_missing_directory_tree_if_needed(surl) handler._insert_missing_directory_tree_if_needed(surl)
self.assertTrue('Could not find parent root dir' in context.exception.message) self.assertTrue('Could not find parent root dir' in str(context.exception))
def test_05_schedule_srmurl_for_visit_for_root_dir(self): def test_05_schedule_srmurl_for_visit_for_root_dir(self):
""" Test higher level method _schedule_srmurl_for_visit for all known root dirs. """ Test higher level method _schedule_srmurl_for_visit for all known root dirs.
...@@ -216,7 +216,7 @@ class TestIngestEventHandler(CommonLTAStorageDbTest): ...@@ -216,7 +216,7 @@ class TestIngestEventHandler(CommonLTAStorageDbTest):
with self.assertRaises(LookupError) as context: with self.assertRaises(LookupError) as context:
surl = site['url'] + '/fdjsalfja5h43535h3oiu/5u905u3f' surl = site['url'] + '/fdjsalfja5h43535h3oiu/5u905u3f'
handler._schedule_srmurl_for_visit(surl) handler._schedule_srmurl_for_visit(surl)
self.assertTrue('Could not find parent root dir' in context.exception.message) self.assertTrue('Could not find parent root dir' in str(context.exception))
def test_08_integration_test_with_messagebus(self): def test_08_integration_test_with_messagebus(self):
""" Full blown integration test listening for notifications on the bus, """ Full blown integration test listening for notifications on the bus,
......
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