<s> from __future__ import unicode_literals <EOL> import time <EOL> import pexpect <EOL> from behave import given , when , then <EOL> def expect_exact ( context , expected ) : <EOL> context . cli . expect_exact ( expected , timeout = <NUM_LIT:2> ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_start_cycli ( context ) : <EOL> context . cli = pexpect . spawnu ( "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_prompt_visible ( context ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ when ( u"<STR_LIT>" ) <EOL> def step_get_env_vars ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_set_param_string ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ when ( u"<STR_LIT>" ) <EOL> def step_get_param_string_key ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_get_param_string_key ( context ) : <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_get_param_string ( context ) : <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_set_param_number ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_get_param_number ( context ) : <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_set_param_boolean ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_get_param_boolean ( context ) : <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_set_param_list ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_get_param_list ( context ) : <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_start_cycli_read_only ( context ) : <EOL> context . cli = pexpect . spawnu ( "<STR_LIT>" ) <EOL> @ when ( u"<STR_LIT>" ) <EOL> def step_execute_write_query ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_tell_read_only ( context ) : <EOL> expect_exact ( context , "<STR_LIT>" ) <EOL> @ when ( u"<STR_LIT>" ) <EOL> def step_get_labels ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ given ( u"<STR_LIT>" ) <EOL> def step_add_node_with_label ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ when ( u"<STR_LIT>" ) <EOL> def step_refresh_schema ( context ) : <EOL> context . cli . sendline ( "<STR_LIT>" ) <EOL> @ then ( u"<STR_LIT>" ) <EOL> def step_see_new_label ( context ) : <EOL> for expected_line in [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] : <EOL> expect_exact ( context , expected_line ) </s>
