Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfowl committed Nov 15, 2024
1 parent 219fa41 commit 12b23b9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/scanners/nessus/test_nessus.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@

class TestNessus:
@patch("requests.Session.request")
@patch("py_nessus_pro.py_nessus_pro.BeautifulSoup") # patch where imported
@patch("py_nessus_pro.py_nessus_pro.webdriver") # patch where imported
def test_setup_nessus(self, mock_driver, mock_bs4, mock_get):
def test_setup_nessus(self, mock_get):
# All this mocking is for PyNessusPro.__init__() which attempts to connect to Nessus
mock_soup = Mock()
mock_soup.find_all.return_value = [{"src": "foo"}]
mock_bs4.return_value = mock_soup
mock_get.return_value = Mock(spec=requests.Response)
mock_get.return_value.status_code = 200
mock_get.return_value.text = '{"token": "foo", "folders": []}'
Expand Down

0 comments on commit 12b23b9

Please sign in to comment.