Skip to content

Commit

Permalink
Merge pull request #40 from ahmednafies/feature/wordometers-population
Browse files Browse the repository at this point in the history
Add population in wordometers data
  • Loading branch information
nf1s authored May 15, 2020
2 parents fb531dc + b48af01 commit 3eca9e5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ __pycache__
.env
.mypy_cache
.venv
.vim
2 changes: 1 addition & 1 deletion covid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Ahmed Nafies Okasha Mohamed <ahmed.nafies@gmail.com>"
__copyright__ = "Copyright 2020, Ahmed Nafies Okasha Mohamed"
__license__ = "MIT"
__version__ = "2.2.9"
__version__ = "2.2.10"


def Covid(source=config.JOHN_HOPKINS):
Expand Down
1 change: 1 addition & 0 deletions covid/worldometers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 2 additions & 0 deletions tests/test_worldometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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"


Expand Down

0 comments on commit 3eca9e5

Please sign in to comment.