Skip to content

Commit

Permalink
trying to fix the black issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmog committed Nov 8, 2023
1 parent 9f7d5d9 commit 0ee5dcc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ format:

check-format:
isort --recursive --atomic --check-only panos
black --check .
black --check --diff .

test:
pytest
Expand Down
26 changes: 15 additions & 11 deletions tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1624,13 +1624,15 @@ class TestIsReady(unittest.TestCase):
@mock.patch("time.sleep")
def test_ok(self, mocksleep):
fw = Base.PanDevice("127.0.0.1", "admin", "secret", api_key="apikey")
fw.xapi.op = mock.Mock(side_effect=[
Err.PanURLError,
pan.xapi.PanXapiError,
Err.PanXapiError,
ET.fromstring("<response><result>yes</result></response>"),
ValueError,
])
fw.xapi.op = mock.Mock(
side_effect=[
Err.PanURLError,
pan.xapi.PanXapiError,
Err.PanXapiError,
ET.fromstring("<response><result>yes</result></response>"),
ValueError,
],
)

ans = fw.is_ready()

Expand All @@ -1640,10 +1642,12 @@ def test_ok(self, mocksleep):
@mock.patch("time.sleep")
def test_times_out(self, mocksleep):
fw = Base.PanDevice("127.0.0.1", "admin", "secret", api_key="apikey")
fw.xapi.op = mock.Mock(side_effect=[
Err.PanURLError,
ValueError,
])
fw.xapi.op = mock.Mock(
side_effect=[
Err.PanURLError,
ValueError,
],
)

ans = fw.is_ready(seconds=0)

Expand Down

0 comments on commit 0ee5dcc

Please sign in to comment.