Adds new menu navigation logic.

This commit is contained in:
PhilipWafula 2021-11-22 13:14:57 +03:00
parent 02f27cd5e8
commit 388f517ee3
Signed by untrusted user: mango-habanero
GPG Key ID: B00CE9034DA19FB7

View File

@ -93,6 +93,30 @@ def menu_zero_zero_selected(state_machine_data: Tuple[str, dict, Account, Sessio
return user_input == '00'
def menu_eleven_selected(state_machine_data: Tuple[str, dict, Account, Session]) -> bool:
"""
This function checks that user input matches a string with value '11'
:param state_machine_data: A tuple containing user input, a ussd session and user object.
:type state_machine_data: tuple
:return: A user input's match with '99'
:rtype: bool
"""
user_input, ussd_session, account, session = state_machine_data
return user_input == '11'
def menu_twenty_two_selected(state_machine_data: Tuple[str, dict, Account, Session]) -> bool:
"""
This function checks that user input matches a string with value '22'
:param state_machine_data: A tuple containing user input, a ussd session and user object.
:type state_machine_data: tuple
:return: A user input's match with '99'
:rtype: bool
"""
user_input, ussd_session, account, session = state_machine_data
return user_input == '22'
def menu_ninety_nine_selected(state_machine_data: Tuple[str, dict, Account, Session]) -> bool:
"""
This function checks that user input matches a string with value '99'