Verified Commit 199b2a27 authored by Martin Matějek's avatar Martin Matějek
Browse files

fixtures: change infrustructure scope to function

This should help make tests truly standalone cases.
parent a6a8fc58
#
# foris-controller-testtools
# Copyright (C) 2018, 2020 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
# Copyright (C) 2018, 2020-2021 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -171,7 +171,7 @@ def cmdline_script_root():
)
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def infrastructure(
request,
backend,
......@@ -330,7 +330,7 @@ def updater_languages():
pass
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def notify_cmd(infrastructure):
def notify(module, action, data, validate=True):
args = ["foris-notify", "-m", module, "-a", action]
......@@ -350,7 +350,7 @@ def notify_cmd(infrastructure):
yield notify
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def notify_api(extra_module_paths, infrastructure):
if infrastructure.name == "ubus":
from foris_controller.buses.ubus import UbusNotificationSender
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment