summaryrefslogtreecommitdiffstats
path: root/openbsc/tests/ctrl_test_runner.py
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-23 11:17:27 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-23 14:05:22 +0100
commitd092f486486db4b2cb2cdc018ad3948d48a26827 (patch)
treeaae83e7b73bfec0cce82f05138df0470b49e4ece /openbsc/tests/ctrl_test_runner.py
parentebe55aa95a11bff56779e1354cf8f6640a1a7a9e (diff)
nitb/ctrl: Add ctrl command to set the TRX max_power_reduction
In case the BTS is connected the new attribute should be set through OML. This is left as a todo item. Addresses: SYS#267
Diffstat (limited to 'openbsc/tests/ctrl_test_runner.py')
-rw-r--r--openbsc/tests/ctrl_test_runner.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py
index 22f378dd5..afcd42cd5 100644
--- a/openbsc/tests/ctrl_test_runner.py
+++ b/openbsc/tests/ctrl_test_runner.py
@@ -176,6 +176,26 @@ class TestCtrlBSC(TestCtrlBase):
self.assertEquals(r['mtype'], 'ERROR')
self.assertEquals(r['error'], 'Error while resolving object')
+ def testTrxPowerRed(self):
+ r = self.do_get('bts.0.trx.0.max-power-reduction')
+ self.assertEquals(r['mtype'], 'GET_REPLY')
+ self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction')
+ self.assertEquals(r['value'], '20')
+
+ r = self.do_set('bts.0.trx.0.max-power-reduction', '22')
+ self.assertEquals(r['mtype'], 'SET_REPLY')
+ self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction')
+ self.assertEquals(r['value'], '22')
+
+ r = self.do_get('bts.0.trx.0.max-power-reduction')
+ self.assertEquals(r['mtype'], 'GET_REPLY')
+ self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction')
+ self.assertEquals(r['value'], '22')
+
+ r = self.do_set('bts.0.trx.0.max-power-reduction', '1')
+ self.assertEquals(r['mtype'], 'ERROR')
+ self.assertEquals(r['error'], 'Value must be even')
+
def testRfLock(self):
r = self.do_get('bts.0.rf_state')
self.assertEquals(r['mtype'], 'GET_REPLY')