Merge pull request #14584 from Security-Onion-Solutions/jertel/wip

update analyser deps for py 3.13
This commit is contained in:
Jason Ertel
2025-05-01 15:59:04 -04:00
committed by GitHub
61 changed files with 3 additions and 7 deletions

View File

@@ -1,10 +1,6 @@
name: python-test
on:
push:
paths:
- "salt/sensoroni/files/analyzers/**"
- "salt/manager/tools/sbin"
pull_request:
paths:
- "salt/sensoroni/files/analyzers/**"
@@ -17,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.13"]
python-code-path: ["salt/sensoroni/files/analyzers", "salt/manager/tools/sbin"]
steps:
@@ -36,4 +32,4 @@ jobs:
flake8 ${{ matrix.python-code-path }} --show-source --max-complexity=12 --doctests --max-line-length=200 --statistics
- name: Test with pytest
run: |
pytest ${{ matrix.python-code-path }} --cov=${{ matrix.python-code-path }} --doctest-modules --cov-report=term --cov-fail-under=100 --cov-config=pytest.ini
PYTHONPATH=${{ matrix.python-code-path }} pytest ${{ matrix.python-code-path }} --cov=${{ matrix.python-code-path }} --doctest-modules --cov-report=term --cov-fail-under=100 --cov-config=pytest.ini

View File

@@ -36,7 +36,7 @@ class TestWhoisLookupMethods(unittest.TestCase):
def test_sendReqNotFound(self):
mock = MagicMock()
mock.side_effect = whoisit.errors.ResourceDoesNotExist()
mock.side_effect = whoisit.errors.ResourceDoesNotExist("foo")
with patch('whoisit.domain', new=mock):
response = whoislookup.sendReq("abcd1234.com")
mock.assert_called_once_with("abcd1234.com", raw=True)