blob: a8a3a1e082633e1a73c63f25fa9aa32d3c9823d5 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import click
from pgcli.packages.prompt_utils import confirm_destructive_query
def test_confirm_destructive_query_notty():
stdin = click.get_text_stream("stdin")
if not stdin.isatty():
sql = "drop database foo;"
assert confirm_destructive_query(sql, "all") is None
|