diff options
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" |