Skip to content

Commit

Permalink
Initial test, not expected to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
dmannarino committed Dec 18, 2024
1 parent 505cc16 commit 0514d42
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions tests_v2/unit/app/routes/thematic/geoencoder/test_geoencoder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import pytest
from httpx import AsyncClient


@pytest.mark.asyncio
async def test_geoencoder_no_version(async_client: AsyncClient) -> None:
params = {"country": "Canada"}

resp = await async_client.get("/thematic/geoencode", params=params)

assert resp.status_code == 400


@pytest.mark.asyncio
async def test_geoencoder_fake_country_no_matches(async_client: AsyncClient) -> None:

params = {"admin_version": "4.1", "country": "Canadiastan"}

resp = await async_client.get("/thematic/geoencode", params=params)

assert resp.status_code == 200
assert resp.status_code == {
"status": "success",
"data": {
"adminVersion": "4.1",
"matches": []
}
}

0 comments on commit 0514d42

Please sign in to comment.