summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-09-02 18:10:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-09-02 18:10:16 +0000
commit49f3e6f07cd08f5d05f24fb16e35c3ca242e381e (patch)
tree53070167b5be6735f27b4382c532f0ec06f7d2c8 /tests
parentAdding upstream version 0.10.9. (diff)
downloadgita-49f3e6f07cd08f5d05f24fb16e35c3ca242e381e.tar.xz
gita-49f3e6f07cd08f5d05f24fb16e35c3ca242e381e.zip
Adding upstream version 0.10.10.upstream/0.10.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_main.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_main.py b/tests/test_main.py
index 1946352..ff28111 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -146,6 +146,17 @@ def test_ungroup(mock_write, _, __, input, expected):
mock_write.assert_called_once_with(expected, 'w')
+@patch('gita.utils.get_config_fname', return_value=GROUP_FNAME)
+def test_group_display(_, capfd):
+ args = argparse.Namespace()
+ args.to_group = None
+ utils.get_groups.cache_clear()
+ __main__.f_group(args)
+ out, err = capfd.readouterr()
+ assert err == ''
+ assert 'xx: a b\nyy: a c d\n' == out
+
+
@patch('gita.utils.is_git', return_value=True)
@patch('gita.utils.get_config_fname', return_value=PATH_FNAME)
@patch('gita.utils.rename_repo')