diff --git a/.gitignore b/.gitignore index 7ca7329..0c6a0fa 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ __pycache__ .env .mypy_cache .venv +.vim diff --git a/covid/__init__.py b/covid/__init__.py index e8c79c9..cc132b0 100644 --- a/covid/__init__.py +++ b/covid/__init__.py @@ -6,7 +6,7 @@ __author__ = "Ahmed Nafies Okasha Mohamed " __copyright__ = "Copyright 2020, Ahmed Nafies Okasha Mohamed" __license__ = "MIT" -__version__ = "2.2.9" +__version__ = "2.2.10" def Covid(source=config.JOHN_HOPKINS): diff --git a/covid/worldometers/models.py b/covid/worldometers/models.py index 96900e3..a5be468 100644 --- a/covid/worldometers/models.py +++ b/covid/worldometers/models.py @@ -27,3 +27,4 @@ class CovidModel(BaseModel): total_deaths_per_million: Decimal = Field( Decimal(0), alias="Deaths/1M pop" ) + population: Decimal = Field(Decimal(0), alias = "Population") diff --git a/tests/test_worldometer.py b/tests/test_worldometer.py index 09f5c7f..8593de5 100644 --- a/tests/test_worldometer.py +++ b/tests/test_worldometer.py @@ -24,6 +24,7 @@ def test_all_data(): assert "total_tests_per_million" in element assert "total_cases_per_million" in element assert "total_deaths_per_million" in element + assert "population" in element def test_get_by_country_name(): @@ -41,6 +42,7 @@ def test_get_by_country_name(): assert "total_tests_per_million" in data assert "total_cases_per_million" in data assert "total_deaths_per_million" in data + assert "population" in data assert data["country"] == "Sweden"