Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
Foris Controller
foris-controller-testtools
Commits
199b2a27
Verified
Commit
199b2a27
authored
Feb 04, 2021
by
Martin Matějek
Browse files
fixtures: change infrustructure scope to function
This should help make tests truly standalone cases.
parent
a6a8fc58
Changes
1
Hide whitespace changes
Inline
Side-by-side
foris_controller_testtools/fixtures.py
View file @
199b2a27
#
# 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment