diff --git a/tests/test_tables_endpoint.py b/tests/test_allowed_resources.py similarity index 99% rename from tests/test_tables_endpoint.py rename to tests/test_allowed_resources.py index e6b821e5..7e7a2691 100644 --- a/tests/test_tables_endpoint.py +++ b/tests/test_allowed_resources.py @@ -1,7 +1,8 @@ """ -Tests for the /-/tables endpoint. +Tests for the allowed_resources() API. -These tests verify that the new TablesView correctly uses the allowed_resources() API. +These tests verify that the allowed_resources() API correctly filters resources +based on permission rules from plugins and configuration. """ import pytest diff --git a/tests/test_search_tables.py b/tests/test_search_tables.py index 5a4f4ca3..34b37706 100644 --- a/tests/test_search_tables.py +++ b/tests/test_search_tables.py @@ -60,24 +60,6 @@ async def ds_with_tables(): # /-/tables.json tests -@pytest.mark.asyncio -async def test_tables_empty_query(ds_with_tables): - """Test that empty query returns empty matches.""" - response = await ds_with_tables.client.get("/-/tables.json") - assert response.status_code == 200 - data = response.json() - assert data == {"matches": []} - - -@pytest.mark.asyncio -async def test_tables_no_query_param(ds_with_tables): - """Test that missing q parameter returns empty matches.""" - response = await ds_with_tables.client.get("/-/tables.json?q=") - assert response.status_code == 200 - data = response.json() - assert data == {"matches": []} - - @pytest.mark.asyncio async def test_tables_basic_search(ds_with_tables): """Test basic table search functionality.""" @@ -163,16 +145,6 @@ async def test_tables_search_respects_table_permissions(ds_with_tables): assert data["matches"][0]["name"] == "content: users" -@pytest.mark.asyncio -async def test_tables_search_no_matches(ds_with_tables): - """Test search with no matching tables.""" - response = await ds_with_tables.client.get("/-/tables.json?q=nonexistent") - assert response.status_code == 200 - data = response.json() - - assert data == {"matches": []} - - @pytest.mark.asyncio async def test_tables_search_response_structure(ds_with_tables): """Test that response has correct structure."""