refactor(metadata): drop geoserver config refs
This commit is contained in:
@@ -38,7 +38,6 @@ async def test_meta_project_returns_map_extent(monkeypatch):
|
||||
project_id = uuid4()
|
||||
repo = SimpleNamespace(
|
||||
get_project_by_id=lambda _project_id: None,
|
||||
get_geoserver_config=lambda _project_id: None,
|
||||
)
|
||||
|
||||
async def get_project_by_id(_project_id):
|
||||
@@ -52,11 +51,7 @@ async def test_meta_project_returns_map_extent(monkeypatch):
|
||||
status="active",
|
||||
)
|
||||
|
||||
async def get_geoserver_config(_project_id):
|
||||
return None
|
||||
|
||||
repo.get_project_by_id = get_project_by_id
|
||||
repo.get_geoserver_config = get_geoserver_config
|
||||
|
||||
response = await module.get_project_metadata(
|
||||
ctx=SimpleNamespace(
|
||||
|
||||
@@ -81,7 +81,7 @@ async def test_project_info_returns_404_when_missing(monkeypatch):
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_project_info_returns_geoserver_payload(monkeypatch):
|
||||
async def test_project_info_returns_project_metadata(monkeypatch):
|
||||
module = _load_project_module(monkeypatch)
|
||||
detail = SimpleNamespace(
|
||||
project_id=uuid4(),
|
||||
@@ -91,13 +91,6 @@ async def test_project_info_returns_geoserver_payload(monkeypatch):
|
||||
gs_workspace="ws",
|
||||
map_extent={"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4},
|
||||
status="active",
|
||||
geoserver=SimpleNamespace(
|
||||
gs_base_url="http://gs",
|
||||
gs_admin_user="admin",
|
||||
gs_datastore_name="store",
|
||||
default_extent={"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4},
|
||||
srid=4326,
|
||||
),
|
||||
)
|
||||
repo = SimpleNamespace(get_project_detail_by_code=AsyncMock(return_value=detail))
|
||||
|
||||
@@ -105,4 +98,3 @@ async def test_project_info_returns_geoserver_payload(monkeypatch):
|
||||
|
||||
assert payload.code == "demo"
|
||||
assert payload.map_extent == {"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4}
|
||||
assert payload.geoserver.gs_base_url == "http://gs"
|
||||
|
||||
Reference in New Issue
Block a user