jenkins-bot merged this change.
[test] skip test when MementoClientException occurs
Bug: T193924
Change-Id: I5b02d3106d4fabb1b555f20bfaeeb0e94253e9b6
---
M tests/weblinkchecker_tests.py
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/weblinkchecker_tests.py b/tests/weblinkchecker_tests.py
index c62b235..2502532 100644
--- a/tests/weblinkchecker_tests.py
+++ b/tests/weblinkchecker_tests.py
@@ -28,6 +28,8 @@
"""Test memento client."""
def _get_archive_url(self, url, date_string=None):
+ from memento_client import MementoClientException # noqa: E402
+
if date_string is None:
when = datetime.datetime.now()
else:
@@ -35,7 +37,7 @@
try:
return weblinkchecker._get_closest_memento_url(
url, when, self.timegate_uri)
- except RequestsConnectionError as e:
+ except (RequestsConnectionError, MementoClientException) as e:
self.skipTest(e)
To view, visit change 431084. To unsubscribe, visit settings.