aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim/test_cli.py
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-06-17 14:54:56 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-06-17 16:12:00 +0200
commitd35d3b8c0ca5784e0ffd7cebad0fa68631f767ab (patch)
tree3ea92ee01fa17ac28439a99b30f4b2fdcac6cc4d /test/mocks/mass-pnf-sim/test_cli.py
parent90d6d7ff2abc2047d1b95fab651647d9f5ce4d9c (diff)
Pass options to each lifecycle method separately
This makes the MassPnfSim object instance stateless. Change-Id: Ic8f7aefa0afb74a15491b5b0e8ba1cb80e3aa3ef Issue-ID: INT-1629 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim/test_cli.py')
-rw-r--r--test/mocks/mass-pnf-sim/test_cli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/mocks/mass-pnf-sim/test_cli.py b/test/mocks/mass-pnf-sim/test_cli.py
index 70c9b6c4f..06d018f39 100644
--- a/test/mocks/mass-pnf-sim/test_cli.py
+++ b/test/mocks/mass-pnf-sim/test_cli.py
@@ -26,7 +26,7 @@ def test_validate_trigger_custom(parser, caplog):
args = parser.parse_args(['trigger_custom', '--triggerstart', '0',
'--triggerend', str(SIM_INSTANCES)])
try:
- MassPnfSim(args).trigger_custom()
+ MassPnfSim().trigger_custom(args)
except SystemExit as e:
assert e.code == 1
assert "--triggerend value greater than existing instance count" in caplog.text
@@ -59,8 +59,8 @@ def test_count_option_bad_value(parser, caplog, subcommand):
'''Test case where invalid value passed to '--count' opt'''
try:
args = parser.parse_args([subcommand, '--count', str(SIM_INSTANCES + 1)])
- m = getattr(MassPnfSim(args), subcommand)
- m()
+ m = getattr(MassPnfSim(), subcommand)
+ m(args)
except SystemExit:
pass
assert '--count value greater that existing instance count' in caplog.text