|
|
@@ -85,9 +85,9 @@ class SNMPPower(Power): |
|
|
|
return await snmpget(self.host, |
|
|
|
'pethPsePortAdminEnable.1.%d' % self.port, 'bool') |
|
|
|
|
|
|
|
async def setvalue(self, typ, v): |
|
|
|
async def setvalue(self, v): |
|
|
|
return await snmpset(self.host, |
|
|
|
'pethPsePortAdminEnable.1.%d' % self.port, typ, v) |
|
|
|
'pethPsePortAdminEnable.1.%d' % self.port, 'bool', v) |
|
|
|
|
|
|
|
|
|
|
|
class TestSNMPWrapper(unittest.IsolatedAsyncioTestCase): |
|
|
@@ -166,7 +166,7 @@ class TestSNMPPower(unittest.IsolatedAsyncioTestCase): |
|
|
|
'bool') |
|
|
|
|
|
|
|
# that when setvalue is called |
|
|
|
await sp.setvalue('bool', True) |
|
|
|
await sp.setvalue(True) |
|
|
|
|
|
|
|
# calls snmpset w/ the correct args |
|
|
|
ss.assert_called_with('host', 'pethPsePortAdminEnable.1.5', |
|
|
|