def __init__(self,
                 first_countries=None,
                 draw_graph=True,
                 sort=CountryInfo.Fields.cases):
        self.__info = Request.world_info()
        self.__historical = Request.world_historical()
        self.__countries = Request.countries(sort=sort)

        self.sort = sort.name
        self.first_countries = first_countries

        super(WorldMessage, self).__init__(Draw.world_historical,
                                           self.__historical,
                                           draw_graph=draw_graph)
Beispiel #2
0
 def test_countries_request(self):
     req = Request.countries()
     for country_info in req.list:
         self.assert_country_info(country_info)
Beispiel #3
0
def top_countries(chat: ChatHandler, _):
    countries_cnt = 3

    req = Request.countries()
    for i in range(countries_cnt - 1):
        send_country_class(chat, country_class=req.list[i])