summaryrefslogtreecommitdiffstats
path: root/tests/test_main.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-09-02 18:11:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-09-02 18:11:11 +0000
commit80408431b690e04e7678a2d75bdc690a5518c1b7 (patch)
treefc7746beb47cae5f1a4778ddf7d5b73b99d19b42 /tests/test_main.py
parentAdding debian version 0.10.9-1. (diff)
downloadgita-80408431b690e04e7678a2d75bdc690a5518c1b7.tar.xz
gita-80408431b690e04e7678a2d75bdc690a5518c1b7.zip
Merging upstream version 0.10.10.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_main.py')
-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')