Skip to content

Commit 9d7e8b4

Browse files
authored
Merge pull request #18 from seecloud/ignore_insecure
Insecure is OK
2 parents e1a41dc + 483d4ec commit 9d7e8b4

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

availability/watcher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ def check_availability(data, results_queue):
4545
:rtype: None
4646
"""
4747
try:
48-
requests.get(data["url"], timeout=(SERVICE_CONN_TIMEOUT,
49-
SERVICE_READ_TIMEOUT))
48+
requests.get(data["url"], verify=False, timeout=(SERVICE_CONN_TIMEOUT,
49+
SERVICE_READ_TIMEOUT))
50+
5051
data["status"] = 1
5152
except Exception as e:
5253
data["status"] = 0

tests/unit/test_watcher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ def test_check_availability(self, mock_log, mock_get):
3838
mock_queue)
3939
self.assertIsNone(result)
4040
mock_get.assert_called_once_with(
41-
"http://foo/", timeout=(watcher.SERVICE_CONN_TIMEOUT,
42-
watcher.SERVICE_READ_TIMEOUT))
41+
"http://foo/", verify=False,
42+
timeout=(watcher.SERVICE_CONN_TIMEOUT,
43+
watcher.SERVICE_READ_TIMEOUT))
4344
mock_queue.put.assert_called_once_with({"url": "http://foo/",
4445
"status": 1})
4546

0 commit comments

Comments
 (0)