test: satisfy strict pyrefly for migrated container tests (#36791)

This commit is contained in:
Escape0707
2026-06-01 11:09:40 +00:00
committed by GitHub
parent 8fc2807194
commit 5658065b97
8 changed files with 150 additions and 79 deletions
@@ -27,7 +27,7 @@ def _count_permissions(session: Session, tenant_id: str) -> int:
class TestGetPermission:
"""Integration tests for PluginPermissionService.get_permission using testcontainers."""
def test_returns_permission_when_found(self, db_session_with_containers: Session):
def test_returns_permission_when_found(self, db_session_with_containers: Session) -> None:
tenant_id = _tenant_id()
permission = TenantPluginPermission(
tenant_id=tenant_id,
@@ -45,7 +45,7 @@ class TestGetPermission:
assert result.install_permission == TenantPluginPermission.InstallPermission.ADMINS
assert result.debug_permission == TenantPluginPermission.DebugPermission.EVERYONE
def test_returns_none_when_not_found(self, db_session_with_containers: Session):
def test_returns_none_when_not_found(self, db_session_with_containers: Session) -> None:
result = PluginPermissionService.get_permission(_tenant_id())
assert result is None
@@ -54,7 +54,7 @@ class TestGetPermission:
class TestChangePermission:
"""Integration tests for PluginPermissionService.change_permission using testcontainers."""
def test_creates_new_permission_when_not_exists(self, db_session_with_containers: Session):
def test_creates_new_permission_when_not_exists(self, db_session_with_containers: Session) -> None:
tenant_id = _tenant_id()
result = PluginPermissionService.change_permission(
@@ -69,7 +69,7 @@ class TestChangePermission:
assert permission.install_permission == TenantPluginPermission.InstallPermission.EVERYONE
assert permission.debug_permission == TenantPluginPermission.DebugPermission.EVERYONE
def test_updates_existing_permission(self, db_session_with_containers: Session):
def test_updates_existing_permission(self, db_session_with_containers: Session) -> None:
tenant_id = _tenant_id()
existing = TenantPluginPermission(
tenant_id=tenant_id,