Skip to content

Commit

Permalink
add characterization test for to_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-sahlmann committed Jul 27, 2023
1 parent f1a05f7 commit 8f75dc4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/test_mb_netmgmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ncclient.transport.ssh import MSG_DELIM
from scapy.layers.snmp import SNMPvarbind

from mb_netmgmt import mb, netconf, ssh, use_scalar_strings, yaml
from mb_netmgmt import mb, netconf, snmp, ssh, use_scalar_strings, yaml
from mb_netmgmt.__main__ import create_server, get_cli_patterns

port = 8081
Expand Down Expand Up @@ -247,3 +247,9 @@ def test_snmp_no_such_instance():
assert result.noSuchInstance
assert not result.endOfMibView
assert bytes(result) == pkt


def test_to_dict():
varbind = SNMPvarbind()
result = snmp.to_dict(varbind)
assert result == {"tag": "NULL", "val": 0}

0 comments on commit 8f75dc4

Please sign in to comment.