def test_snmp_get(self): """ Objective: Test if we can get data via snmp_get """ client = snmp_client.SNMPClient(self.host, self.port) oid = ((1, 3, 6, 1, 2, 1, 1, 1, 0), None) client.get_command(oid, callback=self.mock_callback) self.assertEqual("Siemens, SIMATIC, S7-200", self.result)
def test_snmp_set(self): """ Objective: Test if we can set data via snmp_set """ client = snmp_client.SNMPClient(self.host, self.port) # syslocation oid = ((1, 3, 6, 1, 2, 1, 1, 6, 0), rfc1902.OctetString('TESTVALUE')) client.set_command(oid, callback=self.mock_callback) databus = conpot_core.get_databus() self.assertEqual('TESTVALUE', databus.get_value('sysLocation'))