File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -855,7 +855,9 @@ async def test_plugin_get_excludes_scanned_pages(
855855 )
856856 assert plugin ["activated" ] is True
857857 assert "page" not in plugin
858- assert "pages" not in plugin
858+ assert "pages" in plugin
859+ assert isinstance (plugin ["pages" ], list )
860+ assert PLUGIN_PAGE_DEMO_PAGE_NAME in plugin ["pages" ]
859861
860862
861863@pytest .mark .asyncio
@@ -1433,9 +1435,14 @@ async def test_plugins(
14331435 assert response .status_code == 200
14341436 data = await response .get_json ()
14351437 assert data ["status" ] == "ok"
1436- assert len (data ["data" ]) == 1
1437- assert "components" not in data ["data" ][0 ]
1438- installed_at = data ["data" ][0 ]["installed_at" ]
1438+ assert len (data ["data" ]) >= 1
1439+ target = next (
1440+ (item for item in data ["data" ] if item ["name" ] == test_plugin_name ),
1441+ None ,
1442+ )
1443+ assert target is not None
1444+ assert "components" not in target
1445+ installed_at = target ["installed_at" ]
14391446 assert installed_at is not None
14401447 datetime .fromisoformat (installed_at )
14411448
You can’t perform that action at this time.
0 commit comments