Skip to content

Commit 4bde047

Browse files
authored
Formatting & version (#32)
* formatting * increment version
1 parent f98447e commit 4bde047

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak."
3535
" Project page: https://github.com/ExpDev07/coronavirus-tracker-api."
3636
),
37-
version="2.0.3",
37+
version="2.0.4",
3838
docs_url="/",
3939
redoc_url="/docs",
4040
on_startup=[setup_client_session],

app/services/location/csbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ async def get_locations():
9797
await load_cache(data_id, locations)
9898
except TypeError as type_err:
9999
LOGGER.error(type_err)
100-
100+
101101
# Return the locations.
102102
return locations

tests/test_jhu.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,24 @@ async def test_get_locations(mock_client_session):
3535
@pytest.mark.parametrize(
3636
"key, locations, index, expected",
3737
[
38-
(("Thailand", "TH"), [{"country": "Thailand", "province": "TH", "history": {"test": "yes"}}], 0, {"test": "yes"}), # Success
39-
(("Deutschland", "DE"), [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], 1, {}), # IndexError
40-
(("US", "NJ"), [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], 0, {}), # Invaid Key Merge
38+
(
39+
("Thailand", "TH"),
40+
[{"country": "Thailand", "province": "TH", "history": {"test": "yes"}}],
41+
0,
42+
{"test": "yes"},
43+
), # Success
44+
(
45+
("Deutschland", "DE"),
46+
[{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}],
47+
1,
48+
{},
49+
), # IndexError
50+
(
51+
("US", "NJ"),
52+
[{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}],
53+
0,
54+
{},
55+
), # Invaid Key Merge
4156
],
4257
)
4358
def test_parse_history(key, locations, index, expected):

tests/test_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ async def test_latest(async_api_client, query_params, mock_client_session):
185185

186186
assert response.status_code == 200
187187
assert response_json["latest"]["confirmed"]
188-
assert response_json["latest"]["deaths"]
188+
assert response_json["latest"]["deaths"]

0 commit comments

Comments
 (0)