1 |
commit: 54590b592f4bbb65d66445214be2a6a9351ee112 |
2 |
Author: David Palao <david.palao <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Sep 16 19:46:34 2022 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 25 19:10:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=54590b59 |
7 |
|
8 |
test(actions): fixed little issue in UT |
9 |
|
10 |
Signed-off-by: David Palao <david.palao <AT> gmail.com> |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
lib/portage/tests/emerge/test_actions.py | 13 ++++--------- |
14 |
1 file changed, 4 insertions(+), 9 deletions(-) |
15 |
|
16 |
diff --git a/lib/portage/tests/emerge/test_actions.py b/lib/portage/tests/emerge/test_actions.py |
17 |
index ee59cef5e..d93e44bad 100644 |
18 |
--- a/lib/portage/tests/emerge/test_actions.py |
19 |
+++ b/lib/portage/tests/emerge/test_actions.py |
20 |
@@ -22,14 +22,11 @@ class RunActionTestCase(TestCase): |
21 |
If the implementation changes, the mocks can be adjusted to play its |
22 |
role. |
23 |
""" |
24 |
+ |
25 |
@patch("_emerge.actions.profile_check") |
26 |
@patch("_emerge.actions.adjust_configs") |
27 |
@patch("_emerge.actions.apply_priorities") |
28 |
- def test_binary_trees_populate_called( |
29 |
- self, |
30 |
- papply, |
31 |
- padjust, |
32 |
- profile_ckeck): |
33 |
+ def test_binary_trees_populate_called(self, papply, padjust, profile_ckeck): |
34 |
"""Ensure that ``binarytree.populate`` API is correctly used. |
35 |
The point of this test is to ensure that the ``populate`` method |
36 |
is called as expected: since it is the first time that ``populate`` |
37 |
@@ -37,7 +34,7 @@ class RunActionTestCase(TestCase): |
38 |
""" |
39 |
config = MagicMock() |
40 |
config.action = None |
41 |
- config.opts = {"--quiet": True, "--usepkg": True} |
42 |
+ config.opts = {"--quiet": True, "--usepkg": True, "--package-moves": "n"} |
43 |
bt = MagicMock() |
44 |
tree = {"bintree": bt} |
45 |
trees = {"first": tree} |
46 |
@@ -45,6 +42,4 @@ class RunActionTestCase(TestCase): |
47 |
|
48 |
run_action(config) |
49 |
|
50 |
- bt.populate.assert_called_once_with( |
51 |
- getbinpkgs=False, getbinpkg_refresh=True |
52 |
- ) |
53 |
+ bt.populate.assert_called_once_with(getbinpkgs=False, getbinpkg_refresh=True) |