Wrap execution in try/except

This commit is contained in:
Marian Steinbach 2022-10-20 23:54:49 +02:00
parent bdf3bdba50
commit 46c5be25d2

View file

@ -25,7 +25,10 @@ class TestSpider(unittest.TestCase):
}
url = "https://httpbin.org/html"
result = check_and_rate_site(entry)
try:
result = check_and_rate_site(entry)
except ValueError:
pass
self.assertEqual(result["input_url"], url)