def test_snmp_variable_repr_binary(): var = SNMPVariable( "sysDescr", "0", ub(chr(20)) + "my thingo" + ub(chr(155)), "OCTETSTR" ) assert var.__repr__() == ( "<SNMPVariable value='my thingo (contains binary)' " "(oid='sysDescr', oid_index='0', snmp_type='OCTETSTR')>" )
def test_snmp_variable_repr_binary_only(): var = SNMPVariable( 'sysDescr', '0', ub(chr(20)) + ub(chr(155)), 'OCTETSTR' ) assert var.__repr__() == ( "<SNMPVariable value='(contains binary)' " "(oid='sysDescr', oid_index='0', snmp_type='OCTETSTR')>" )
def test_snmp_variable_repr_none(): var = SNMPVariable() assert var.__repr__() == ( "<SNMPVariable value=None (oid=None, oid_index=None, snmp_type=None)>")
def test_snmp_variable_repr_binary_only(): var = SNMPVariable('sysDescr', '0', ub(chr(20)) + ub(chr(155)), 'OCTETSTR') assert var.__repr__() == ( "<SNMPVariable value='(contains binary)' " "(oid='sysDescr', oid_index='0', snmp_type='OCTETSTR')>")
def test_snmp_variable_repr(): var = SNMPVariable('sysDescr', '0', 'my thingo', 'OCTETSTR') assert var.__repr__() == ( "<SNMPVariable value='my thingo' " "(oid='sysDescr', oid_index='0', snmp_type='OCTETSTR')>")
def test_snmp_variable_repr_none(): var = SNMPVariable() assert var.__repr__() == ( "<SNMPVariable value=None (oid=None, oid_index=None, snmp_type=None)>" )
def test_snmp_variable_repr(): var = SNMPVariable('sysDescr', '0', 'my thingo', 'OCTETSTR') assert var.__repr__() == ( "<SNMPVariable value='my thingo' " "(oid='sysDescr', oid_index='0', snmp_type='OCTETSTR')>" )