summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 1a7d83b..91a8894 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -115,6 +115,7 @@ class testCommandsSimple(unittest.TestCase, CommandsMixin):
'offset': None,
'pagesize': None,
'sort': None,
+ 'expand_query_template': False,
'all': False,
}
streams = self._run_command(command.Search(), args)
@@ -205,6 +206,23 @@ class testCommandsComplex(unittest.TestCase, CommandsMixin):
self.assertIn('this: 1', streams['stdout'].getvalue())
self.assertEqual(streams['stderr'].getvalue(), '')
+ def test_search_template(self):
+ args = {
+ 'collection': self.tmpdir.name,
+ 'git': True,
+ 'template': False,
+ 'query': '{{ nice }}',
+ 'expand_query_template': True,
+ 'offset': None,
+ 'pagesize': None,
+ 'sort': None,
+ 'all': False,
+ }
+ streams = self._run_command(command.Search(), args)
+ self.assertIn('8e9fa1ed', streams['stdout'].getvalue())
+ self.assertIn('5084bc6e', streams['stdout'].getvalue())
+ self.assertEqual(streams['stderr'].getvalue(), '')
+
if __name__ == '__main__':
unittest.main()