Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Nov 3, 2023
1 parent d240dc1 commit 23e7b98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unittests/portadmin/portadmin_poe_cisco_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def test_dict_should_give_none_if_interface_does_not_support_poe(
):
handler_cisco._get_poe_indexes_for_interface = Mock(return_value=(1, 1))
handler_cisco._query_netbox = Mock(return_value=None)
interface = Mock(ifindex=1)
interface = Mock(interface="interface")
states = handler_cisco.get_poe_states([interface])
assert states[interface.ifindex] is None
assert states[interface.ifname] is None

def test_returns_correct_poe_state_cisco(self, handler_cisco):
expected_state = Cisco.POE_AUTO
handler_cisco._get_poe_indexes_for_interface = Mock(return_value=(1, 1))
handler_cisco._query_netbox = Mock(return_value=expected_state.state)
interface = Mock(ifindex=1)
interface = Mock(ifname="interface")
state = handler_cisco.get_poe_states([interface])
assert state[interface.ifindex] == expected_state
assert state[interface.ifname] == expected_state

0 comments on commit 23e7b98

Please sign in to comment.