def test_command_stack_w_w_2(self): """Tests if the Command Stack is created correctly Case: word word functions""" inputs = { 'brother_bool': True, 'child_bool': True, 'uncle_bool': True, 'cousin_bool': False, 'cousin_level_bool': False, 'idiom_1': 'afr', 'word_1': 'afvaar', 'idiom_2': 'afr', 'word_2': 'vaar', 'brother': '', 'child': '', 'uncle': '', 'cousin': '', 'cousin_level': '', 'error': '' } expected_functions = 9 _, functions, _ = get_commands(inputs, g08_logic_w_w) assert expected_functions == len(functions)
def test_command_stack_i_i_3(self): """Tests if the Command Stack is created correctly Case: word word outputs""" inputs = { 'common_amount_bool': True, 'common_bool': False, 'contributed_most_bool': False, 'idiom_list_bool': False, 'idiom_1': 'afr', 'idiom_2': 'eng', 'common_amount': '', 'common': '', 'contributed_most': '', 'idiom_list': '', 'error': '' } expected_outputs = { 'idiom_1': 'afr', 'idiom_2': 'eng', 'common_amount': '', 'common': '', 'contributed_most': '', 'idiom_list': '', 'error': '' } _, _, outputs = get_commands(inputs, g08_logic_i_i) assert expected_outputs == outputs
def test_command_stack_i_w_3(self): """Tests if the Command Stack is created correctly Case: word word outputs""" inputs = { 'related_bool': True, 'originated_bool': False, 'list_bool': False, 'idiom': 'afr', 'word_idiom': 'eng', 'word': 'taco', 'related': '', 'originated': '', 'listing': '', 'error': '' } expected_outputs = { 'idiom': 'afr', 'word_idiom': 'eng', 'word': 'taco', 'related': '', 'originated': '', 'listing': '', 'error': '' } _, _, outputs = get_commands(inputs, g08_logic_i_w) assert expected_outputs == outputs
def test_command_stack_i_w_2(self): """Tests if the Command Stack is created correctly Case: word word functions""" inputs = { 'related_bool': True, 'originated_bool': False, 'list_bool': False, 'idiom': 'afr', 'word_idiom': 'eng', 'word': 'taco', 'related': '', 'originated': '', 'listing': '', 'error': '' } expected_functions = { 'createQuery': '', 'executeQuery': '', 'fillComplexRules': '', 'listing': '', 'originated': '', 'related': '' } _, functions, _ = get_commands(inputs, g08_logic_i_w) assert len(expected_functions) == len(functions)
def test_command_stack_i_i_2(self): """Tests if the Command Stack is created correctly Case: word word functions""" inputs = { 'common_amount_bool': True, 'common_bool': False, 'contributed_most_bool': False, 'idiom_list_bool': False, 'idiom_1': 'afr', 'idiom_2': 'eng', 'common_amount': '', 'common': '', 'contributed_most': '', 'idiom_list': '', 'error': '' } _, functions, _ = get_commands(inputs, g08_logic_i_i) assert 9 == len(functions)