diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-31 22:16:00 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-31 22:38:48 +0100 |
commit | 4e13a8f9f9d40e5d62c9cee7d76348ef8b558981 (patch) | |
tree | 71a31d8620d449137fda631a4dc6719eea6d82ec /openbsc/tests/ctrl_test_runner.py | |
parent | b8c204cb929a8455bfa6006a95a958d57274ab08 (diff) |
bsc/nitb: Allow to set the GPRS mode through the ctrl command
Create a control command to read and modify the gprs mode. Use
the get_string_value to indicate if the value was found or not.
This is useful for the ctrl interface where I didn't want to
replicate "none", "gprs" and "egprs". Share code to verify that
a BTS supports the mode.
Related: SYS#591
Diffstat (limited to 'openbsc/tests/ctrl_test_runner.py')
-rw-r--r-- | openbsc/tests/ctrl_test_runner.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index a1e1d4dc6..502da7657 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -491,6 +491,25 @@ class TestCtrlNITB(TestCtrlBase): self.assertEquals(r['mtype'], 'SET_REPLY') self.assertEquals(r['value'], 'Tried to drop the BTS') + def testGprsMode(self): + r = self.do_get('bts.0.gprs-mode') + self.assertEquals(r['mtype'], 'GET_REPLY') + self.assertEquals(r['var'], 'bts.0.gprs-mode') + self.assertEquals(r['value'], 'none') + + r = self.do_set('bts.0.gprs-mode', 'bla') + self.assertEquals(r['mtype'], 'ERROR') + self.assertEquals(r['error'], 'Mode is not known') + + r = self.do_set('bts.0.gprs-mode', 'egprs') + self.assertEquals(r['mtype'], 'SET_REPLY') + self.assertEquals(r['value'], 'egprs') + + r = self.do_get('bts.0.gprs-mode') + self.assertEquals(r['mtype'], 'GET_REPLY') + self.assertEquals(r['var'], 'bts.0.gprs-mode') + self.assertEquals(r['value'], 'egprs') + class TestCtrlNAT(TestCtrlBase): def ctrl_command(self): |