Module ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Assign NameStore Dict Str Dict Str Str Dict Str Num Dict Str Num FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Dict Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr ListLoad Call NameLoad Num Call NameLoad Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Num Expr Call AttributeLoad NameLoad attr NameLoad Str Num decorator_list Call NameLoad Str Call AttributeLoad NameLoad attr NameLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListComp Call NameLoad comprehension NameStore Call NameLoad Num Assign AttributeStore SubscriptLoad NameLoad Index Num attr TupleLoad NameLoad Num Assign AttributeStore SubscriptLoad NameLoad Index Num attr Str Assign AttributeStore SubscriptLoad NameLoad Index Num attr AttributeStore SubscriptLoad NameLoad Index Num attr AttributeStore SubscriptLoad NameLoad Index Num attr TupleLoad NameLoad Num Assign AttributeStore SubscriptLoad NameLoad Index Num attr Str Assign AttributeStore SubscriptLoad NameLoad Index Num attr Str Assign AttributeStore SubscriptLoad NameLoad Index Num attr Str Assign AttributeStore SubscriptLoad NameLoad Index Num attr TupleLoad NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Num Assign NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list Call NameLoad Str decorator_list
N/A test CollectorTestCase test get_collector_config mock call Mock patch unittest TestCase diamond.collector Collector portstat get_port_stats PortStatCollector PortStatCollectorTestCase N/A CollectorTestCase N/A N/A TEST_CONFIG N/A port N/A something1 something2 N/A number 5222 N/A number 8888 setUp N/A N/A self N/A N/A N/A config N/A get_collector_config PortStatCollector N/A self TEST_CONFIG N/A N/A self collector N/A PortStatCollector config None N/A test_import N/A N/A self N/A N/A N/A N/A N/A self assertTrue PortStatCollector N/A test_collect N/A N/A self publish_mock get_port_stats_mock N/A N/A N/A N/A get_port_stats_mock return_value N/A foo 1 N/A N/A N/A N/A self collector collect N/A N/A N/A get_port_stats_mock assert_has_calls N/A N/A call 5222 N/A call 8888 any_order True N/A N/A N/A self assertPublished publish_mock something1.foo 1 N/A N/A N/A self assertPublished publish_mock something2.foo 1 N/A N/A patch portstat.get_port_stats N/A N/A patch object Collector publish N/A GetPortStatsTestCase N/A TestCase N/A test_get_port_stats N/A N/A self net_connections_mock N/A N/A N/A ports N/A N/A Mock N/A _ N/A range 5 N/A N/A N/A ports N/A 0 laddr N/A None 5222 N/A N/A N/A ports N/A 0 status ok N/A N/A N/A ports N/A 1 laddr N/A N/A ports N/A 2 laddr N/A N/A ports N/A 3 laddr N/A None 8888 N/A N/A N/A ports N/A 1 status ok N/A N/A N/A ports N/A 2 status OK N/A N/A N/A ports N/A 3 status bad N/A N/A N/A ports N/A 4 laddr N/A None 9999 N/A N/A net_connections_mock return_value ports N/A cnts N/A get_port_stats 5222 N/A N/A N/A net_connections_mock assert_called_once N/A N/A N/A self assertEqual cnts N/A ok 1 N/A cnts N/A get_port_stats 8888 N/A N/A N/A net_connections_mock assert_called_once N/A N/A N/A self assertEqual cnts N/A ok bad 2 1 N/A N/A patch portstat.psutil.net_connections N/A