diff options
author | Alexander Chemeris <alexander.chemeris@gmail.com> | 2013-10-04 23:54:17 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-05 10:27:47 +0200 |
commit | bd6d40f1fb5d73fd27feeb8faff13ee89a346cf5 (patch) | |
tree | eeeb14bb3533c869117488ee6175fcae60557763 /openbsc/tests/vty_test_runner.py | |
parent | 4ad593c8f636ba566f914c086287c43bb75ed7f8 (diff) |
nitb: Add "subscriber create" VTY command.
It may be useful in production, but it's really required for
VTY testing of subscriber related commands.
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r-- | openbsc/tests/vty_test_runner.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 3bb7bd86b..0bd79720e 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -215,6 +215,22 @@ class TestVTYNITB(TestVTYGenericBSC): if classNum != 10: self.assertEquals(res.find("rach access-control-class " + str(classNum) + " barred"), -1) + def testSubscriberCreate(self): + self.vty.enable() + + imsi = "204300854013739" + + # Initially we don't have this subscriber + self.vty.verify('show subscriber imsi '+imsi, ['% No subscriber found for imsi '+imsi]) + + # Lets create one + res = self.vty.command('subscriber create imsi '+imsi) + self.assert_(res.find(" IMSI: "+imsi) > 0) + + # Now we have it + res = self.vty.command('show subscriber imsi '+imsi) + self.assert_(res.find(" IMSI: "+imsi) > 0) + class TestVTYBSC(TestVTYGenericBSC): def vty_command(self): |