Skip to content

Commit 67fb6bf

Browse files
committed
Sort out some tests
Signed-off-by: mulhern <amulhern@redhat.com>
1 parent 89eeb31 commit 67fb6bf

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/whitebox/integration/test_stratis.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
# isort: LOCAL
2525
from stratis_cli import StratisCliErrorCodes, run
26+
from stratis_cli._actions import _dynamic
2627
from stratis_cli._errors import StratisCliStratisdVersionError
2728

2829
from ._misc import RUNNER, TEST_RUNNER, RunTestCase, SimTestCase
@@ -76,15 +77,13 @@ def test_outdated_stratisd_version(self):
7677
Verify that an outdated version of stratisd will produce a
7778
StratisCliStratisdVersionError.
7879
"""
79-
# pylint: disable=import-outside-toplevel
80-
# isort: LOCAL
81-
from stratis_cli._actions import _data
80+
Manager0 = _dynamic.make_dyn_class("Manager0")
8281

8382
command_line = ["--propagate", "daemon", "version"]
8483

8584
# pylint: disable=protected-access
8685
with patch.object(
87-
_data.Manager0.Properties.Version,
86+
_dynamic._LOOKUP["Manager0"][2].Properties.Version,
8887
"Get",
8988
return_value="1.0.0",
9089
):
@@ -107,12 +106,12 @@ def test_catch_keyboard_exception(self):
107106
at the calling method generated by dbus-python-client-gen.
108107
"""
109108

110-
# pylint: disable=import-outside-toplevel
111-
# isort: LOCAL
112-
from stratis_cli._actions import _data
109+
Manager0 = _dynamic.make_dyn_class("Manager0")
113110

114111
with patch.object(
115-
_data.Manager0.Properties.Version, "Get", side_effect=KeyboardInterrupt()
112+
_dynamic._LOOKUP["Manager0"][2].Properties.Version,
113+
"Get",
114+
side_effect=KeyboardInterrupt(),
116115
):
117116
with self.assertRaises(KeyboardInterrupt):
118117
run()(["daemon", "version"])

0 commit comments

Comments
 (0)