From 12ffec7e2e719776343027f9fbdd0d070d3ff68c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Feb 2021 12:28:55 +0100 Subject: Merging upstream version 1.23.2. Signed-off-by: Daniel Baumann --- test/features/steps/crud_database.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'test/features/steps/crud_database.py') diff --git a/test/features/steps/crud_database.py b/test/features/steps/crud_database.py index a0bfa53..841f37d 100644 --- a/test/features/steps/crud_database.py +++ b/test/features/steps/crud_database.py @@ -37,6 +37,14 @@ def step_db_connect_test(context): context.cli.sendline('use {0};'.format(db_name)) +@when('we connect to quoted test database') +def step_db_connect_quoted_tmp(context): + """Send connect to database.""" + db_name = context.conf['dbname'] + context.currentdb = db_name + context.cli.sendline('use `{0}`;'.format(db_name)) + + @when('we connect to tmp database') def step_db_connect_tmp(context): """Send connect to database.""" @@ -64,15 +72,13 @@ def step_see_prompt(context): user = context.conf['user'] host = context.conf['host'] dbname = context.currentdb - wrappers.expect_exact(context, '{0}@{1}:{2}> '.format( - user, host, dbname), timeout=5) - context.atprompt = True + wrappers.wait_prompt(context, '{0}@{1}:{2}> '.format(user, host, dbname)) @then('we see help output') def step_see_help(context): for expected_line in context.fixture_data['help_commands.txt']: - wrappers.expect_exact(context, expected_line + '\r\n', timeout=1) + wrappers.expect_exact(context, expected_line, timeout=1) @then('we see database created') @@ -96,10 +102,7 @@ def step_see_db_dropped_no_default(context): context.currentdb = None wrappers.expect_exact(context, 'Query OK, 0 rows affected', timeout=2) - wrappers.expect_exact(context, '{0}@{1}:{2}> '.format( - user, host, database), timeout=5) - - context.atprompt = True + wrappers.wait_prompt(context, '{0}@{1}:{2}>'.format(user, host, database)) @then('we see database connected') -- cgit v1.2.3