Skip to content

Commit

Permalink
reformatted with python black
Browse files Browse the repository at this point in the history
  • Loading branch information
Slenderman00 committed Oct 10, 2023
1 parent f55c260 commit 27743dc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/unittests/ipdevpoll/plugins_paloaltoarp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,18 @@ def test_get_mappings():
# Mocking the __init__ method
with patch.object(PaloaltoArp, "__init__", lambda x: None):
instance = PaloaltoArp()
instance.config = {
'paloaltoarp': {
'abcdefghijklmnop': '0.0.0.0'
}
}
instance.config = {'paloaltoarp': {'abcdefghijklmnop': '0.0.0.0'}}

# Mocking _do_request to return the mock_data when called
with patch.object(PaloaltoArp, "_do_request", return_value=defer.succeed(mock_data)):
mappings = yield instance._get_paloalto_arp_mappings("0.0.0.0", "abcdefghijklmnop")
with patch.object(
PaloaltoArp, "_do_request", return_value=defer.succeed(mock_data)
):
mappings = yield instance._get_paloalto_arp_mappings(
"0.0.0.0", "abcdefghijklmnop"
)

assert mappings == [
('ifindex', IP('192.168.0.1'), '00:00:00:00:00:01'),
('ifindex', IP('192.168.0.2'), '00:00:00:00:00:02'),
('ifindex', IP('192.168.0.3'), '00:00:00:00:00:03'),
]

0 comments on commit 27743dc

Please sign in to comment.