diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-05-25 00:54:12 -0700 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2020-05-25 14:06:11 +0000 |
commit | 59aef35ebd5f345336937588cea7ddd5e2ea8cc1 (patch) | |
tree | e3a5c7c25f05dc1d8c4b0a987d5af16cdcfecf5a /test/mocks/mass-pnf-sim/conftest.py | |
parent | 83e0ecdc30a46dc19fbee3e9bf1e6cea3dda0060 (diff) |
Add pytest fixtures
This adds fixtures that'll be utilised by unit
and functional tests.
Change-Id: Iaeed869d8320ccc44d485fc00c590741352e34e6
Issue-ID: INT-1577
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim/conftest.py')
-rw-r--r-- | test/mocks/mass-pnf-sim/conftest.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/mocks/mass-pnf-sim/conftest.py b/test/mocks/mass-pnf-sim/conftest.py new file mode 100644 index 000000000..b1f688d17 --- /dev/null +++ b/test/mocks/mass-pnf-sim/conftest.py @@ -0,0 +1,30 @@ +import MassPnfSim +import pytest +from test_settings import * # pylint: disable=W0614 + +@pytest.fixture(scope="module") +def parser(): + return MassPnfSim.get_parser() + +@pytest.fixture(scope="module") +def args_bootstrap(parser): + return parser.parse_args(['bootstrap', '--count', str(SIM_INSTANCES), + '--urlves', URLVES, '--ipfileserver', IPFILESERVER, + '--typefileserver', TYPEFILESERVER, '--ipstart', + IPSTART]) + +@pytest.fixture(scope="module") +def args_start(parser): + return parser.parse_args(['start']) + +@pytest.fixture(scope="module") +def args_stop(parser): + return parser.parse_args(['stop']) + +@pytest.fixture(scope="module") +def args_status(parser): + return parser.parse_args(['status']) + +@pytest.fixture(scope="module") +def args_trigger(parser): + return parser.parse_args(['trigger']) |