Skip to content

Commit 31dbadc

Browse files
author
ExpDev07
committed
logs
1 parent 9c9d045 commit 31dbadc

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app/utils/countrycodes.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,4 +374,11 @@ def country_code(country):
374374
country = synonyms[country]
375375

376376
# Get country or fallback to default_code.
377-
return is_3166_1.get(country, default_code)
377+
country_code = is_3166_1.get(country, default_code)
378+
379+
# Default picked?
380+
if country_code == default_code:
381+
print("No country_code found for '%s'. Using '%s'!" % (country, country_code))
382+
383+
# Return
384+
return country_code

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
Global conftest file for shared pytest fixtures
55
"""
66
import pytest
7-
from fastapi.testclient import TestClient
87

98
from app.main import APP
9+
from fastapi.testclient import TestClient
1010

1111

1212
@pytest.fixture

tests/test_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from unittest import mock
55

66
import pytest
7-
from fastapi.testclient import TestClient
87

98
import app
109
from app import services
1110
from app.main import APP
11+
from fastapi.testclient import TestClient
1212

1313
from .test_jhu import DATETIME_STRING, mocked_requests_get, mocked_strptime_isoformat
1414

0 commit comments

Comments
 (0)