def admin_show_choice(token): try: choice_type = token[1] except: #print 'Your input was wrong, near show ...' return False if choice_type == 'databases': show_databases() return True elif choice_type == 'tables': tables = show_tables(default_variable.CURRENT_DB) if tables is None: return False else: return True else: return False
def test_show_tables(): database_name = 'a' show_tables(database_name) database_name = 'b' show_tables(database_name) raw_input('>')