<s> """<STR_LIT:U+0020>""" <EOL> import unittest <EOL> from pycopia . SMI import SMI <EOL> class SMITests ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> SMI . load_modules ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> mods = list ( SMI . get_modules ( ) ) <EOL> self . mod = mods [ - <NUM_LIT:1> ] <EOL> def test_get_modules ( self ) : <EOL> """<STR_LIT>""" <EOL> print ( self . mod ) <EOL> def test_get_scalars ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> scalars = list ( self . mod . get_scalars ( ) ) <EOL> scalar = scalars [ <NUM_LIT:1> ] <EOL> print ( scalar ) <EOL> def test_get_rows ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> rows = list ( self . mod . get_rows ( SMI . SMI_STATUS_CURRENT ) ) <EOL> print ( rows [ <NUM_LIT:0> ] ) <EOL> def test_types ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> tcmib = SMI . get_module ( "<STR_LIT>" ) <EOL> smi_types = tcmib . get_types ( ) <EOL> for smi_type in smi_types : <EOL> print ( "<STR_LIT>" , smi_type , smi_type . snmptype ) <EOL> def test_index ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> rtpmib = SMI . get_module ( "<STR_LIT>" ) <EOL> rtpsess = rtpmib . get_node ( "<STR_LIT>" ) <EOL> rtpsess_index = rtpsess . get_index ( ) <EOL> for ind in rtpsess_index : <EOL> print ( rtpmib . get_node ( ind . name ) . value ) <EOL> def test_augments ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> snmpmib = SMI . get_module ( "<STR_LIT>" ) <EOL> taenode = snmpmib . get_node ( "<STR_LIT>" ) <EOL> taenode_index = taenode . get_index ( ) <EOL> print ( repr ( taenode_index ) ) <EOL> comm = snmpmib . get_node ( "<STR_LIT>" ) <EOL> comm_index = comm . get_index ( ) <EOL> print ( repr ( comm_index ) ) <EOL> newoid = comm . OID <EOL> print ( newoid ) <EOL> def test_ipmib ( self ) : <EOL> ipmod = SMI . get_module ( "<STR_LIT>" ) <EOL> eslist = ipmod . get_scalars ( ) <EOL> for es in eslist : <EOL> print ( es . name , es . syntax ) <EOL> n = ipmod . get_node ( "<STR_LIT>" ) <EOL> print ( n . syntax . enumerations ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
