From 69472c666c735b45ec08ada4c91ab960ac42b2bb Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 4 Feb 2020 13:05:37 -0800 Subject: [PATCH] make sure that we only handle hash urls.. --- casimport/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/casimport/__init__.py b/casimport/__init__.py index 3ee5dd3..fdde021 100644 --- a/casimport/__init__.py +++ b/casimport/__init__.py @@ -689,3 +689,7 @@ class Test(unittest.TestCase): # that when read raises an exception with self.assertRaises(ValueError): fdcas.fetch_data(urllib.parse.urlparse('hash://sha256/0000')) + + # that when passed an invalid url + with self.assertRaises(ValueError): + fdcas.fetch_data(urllib.parse.urlparse('https://sha256/0000'))