async def add(self, poll): """ It will add a new PollHandler to the list. Then the message with the poll will be sent Arguments: poll(PollModel): Poll that will be added to the handler. """ poll_handler = PollHandler(poll) self.current_polls.append(poll_handler) await poll_handler.send_poll_n_react()
def test_seconds2str8(): seconds = 175000 assert "2d" == PollHandler.seconds2str(None, seconds)
def test_seconds2str7(): seconds = 100001 assert "1d y 3h" == PollHandler.seconds2str(None, seconds)
def test_seconds2str6(): seconds = 43200 assert "12h" == PollHandler.seconds2str(None, seconds)
def test_seconds2str5(): seconds = 35780 assert "9h y 56m" == PollHandler.seconds2str(None, seconds)
def test_seconds2str4(): seconds = 650 assert "10m y 50s" == PollHandler.seconds2str(None, seconds)
def test_seconds2str3(): seconds = 546 assert "9m y 6s" == PollHandler.seconds2str(None, seconds)
def test_seconds2str2(): seconds = 120 assert "2m" == PollHandler.seconds2str(None, seconds)
def test_seconds2str1(): seconds = 55 assert "55s" == PollHandler.seconds2str(None, seconds)