mirror of
https://github.com/dbcli/pgcli.git
synced 2024-09-11 13:56:36 +03:00
Merge pull request #1116 from dbcli/test_
Add a test to verify error message.
This commit is contained in:
commit
199a0223e0
@ -10,6 +10,11 @@ Feature: run the cli,
|
||||
When we send source command
|
||||
then we see help output
|
||||
|
||||
Scenario: run partial select command
|
||||
When we send partial select command
|
||||
then we see error message
|
||||
then we see dbcli prompt
|
||||
|
||||
Scenario: check our application_name
|
||||
When we run query to check application_name
|
||||
then we see found
|
||||
|
@ -82,6 +82,20 @@ def step_send_help(context):
|
||||
context.cli.sendline("\?")
|
||||
|
||||
|
||||
@when("we send partial select command")
|
||||
def step_send_partial_select_command(context):
|
||||
"""
|
||||
Send `SELECT a` to see completion.
|
||||
"""
|
||||
context.cli.sendline("SELECT a")
|
||||
|
||||
|
||||
@then("we see error message")
|
||||
def step_see_error_message(context):
|
||||
wrappers.expect_exact(context, 'column "a" does not exist', timeout=2)
|
||||
wrappers.wait_prompt(context)
|
||||
|
||||
|
||||
@when("we send source command")
|
||||
def step_send_source_command(context):
|
||||
context.tmpfile_sql_help = tempfile.NamedTemporaryFile(prefix="pgcli_")
|
||||
|
Loading…
Reference in New Issue
Block a user