Пример #1
0
 def setUpClass(cls):
     initialization('test_lets.db')
     meeting1 = add_meeting('Тестовое мероприятие 1', '@111')
     meeting2 = add_meeting('Тестовое мероприятие 2', '@222')
     meetings.append(meeting1)
     meetings.append(meeting2)
     test_question = 'Как дела?'
     test_options = 'Отлично, Хорошо, Нормально, Не очень'
     test_qid.append(add_question(meeting1, test_question,
                                  test_options))
Пример #2
0
 def setUpClass(cls):
     initialization('test_lets.db')
     meeting1 = add_meeting('Тестовое мероприятие 1', '@111')
     meeting2 = add_meeting('Тестовое мероприятие 2', '@222')
     meetings.append(meeting1)
     meetings.append(meeting2)
Пример #3
0
from database.CreateDB import initialization

# handlers
from handlers.start_help_info import start_handler, help_handler, info_handler

from handlers.create_meeting import create_meeting_handler
from handlers.get_id import get_id_handler
from handlers.join import join_handler
from handlers.get_meeting_info import get_meeting_info_handler
from handlers.add_question import add_question_handler
from handlers.poll import poll_handler, poll_answer_handler

from handlers.msg_responses import msg_handler
from handlers.error import error_handler

initialization("database/lets.db")


def main():
	apikey = getenv("APIKEY")
	if not apikey:
		print("не обрнаружен APIKEY")
		exit(1)
	updater = Updater(apikey, use_context=True)
	dp = updater.dispatcher

	# order is important!
	dp.add_handler(start_handler)
	dp.add_handler(help_handler)
	dp.add_handler(info_handler)
	dp.add_handler(get_id_handler)