diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-03 09:16:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-03 09:16:38 +0000 |
commit | 9c4b870e75ec43120e43968462515790e646de10 (patch) | |
tree | d8f80fcf7014fc01bd7f79a32e7e348aa68660ff /tests/test_main.py | |
parent | Releasing debian version 0.16.2-2. (diff) | |
download | gita-9c4b870e75ec43120e43968462515790e646de10.tar.xz gita-9c4b870e75ec43120e43968462515790e646de10.zip |
Merging upstream version 0.16.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_main.py')
-rw-r--r-- | tests/test_main.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/test_main.py b/tests/test_main.py index e36c2d8..0f2eeb5 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -94,14 +94,14 @@ class TestLsLl: out, err = capfd.readouterr() assert err == "" assert "gita" in out - assert info.Color.end in out + assert info.Color.end.value in out # no color on branch name __main__.main(["ll", "-C"]) out, err = capfd.readouterr() assert err == "" assert "gita" in out - assert info.Color.end not in out + assert info.Color.end.value not in out __main__.main(["ls", "gita"]) out, err = capfd.readouterr() @@ -367,8 +367,9 @@ class TestGroupCmd: assert err == "" assert "xx yy\n" == out + @patch("gita.utils.get_repos", return_value={"a": "", "b": "", "c": "", "d": ""}) @patch("gita.common.get_config_fname", return_value=GROUP_FNAME) - def test_ll(self, _, capfd): + def test_ll(self, _, __, capfd): args = argparse.Namespace() args.to_group = None args.group_cmd = None @@ -382,8 +383,9 @@ class TestGroupCmd: == "\x1b[4mxx\x1b[0m: \n - a\n - b\n\x1b[4myy\x1b[0m: \n - a\n - c\n - d\n" ) + @patch("gita.utils.get_repos", return_value={"a": "", "b": "", "c": "", "d": ""}) @patch("gita.common.get_config_fname", return_value=GROUP_FNAME) - def test_ll_with_group(self, _, capfd): + def test_ll_with_group(self, _, __, capfd): args = argparse.Namespace() args.to_group = None args.group_cmd = None @@ -394,9 +396,10 @@ class TestGroupCmd: assert err == "" assert "a c d\n" == out + @patch("gita.utils.get_repos", return_value={"a": "", "b": "", "c": "", "d": ""}) @patch("gita.common.get_config_fname", return_value=GROUP_FNAME) @patch("gita.utils.write_to_groups_file") - def test_rename(self, mock_write, _): + def test_rename(self, mock_write, *_): args = argparse.Namespace() args.gname = "xx" args.new_name = "zz" |