From 4edd467b28c895483cd5468d51d1c6824a21715a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 14 Aug 2020 18:58:23 +0200 Subject: Adding upstream version 1.5.0. Signed-off-by: Daniel Baumann --- tests/test_prompt_utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/test_prompt_utils.py (limited to 'tests/test_prompt_utils.py') diff --git a/tests/test_prompt_utils.py b/tests/test_prompt_utils.py new file mode 100644 index 0000000..2de74ce --- /dev/null +++ b/tests/test_prompt_utils.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + + +import click + +from litecli.packages.prompt_utils import confirm_destructive_query + + +def test_confirm_destructive_query_notty(): + stdin = click.get_text_stream("stdin") + assert stdin.isatty() is False + + sql = "drop database foo;" + assert confirm_destructive_query(sql) is None -- cgit v1.2.3