feat(storage): group usage by application and runtimes

This commit is contained in:
Hyu
2026-09-03 00:11:05 +08:00
parent 380bdfeca6
commit be0214cf4d
8 changed files with 543 additions and 41 deletions
+14
View File
@@ -430,6 +430,20 @@ async def test_box_service_get_sessions_delegates_to_client():
client.get_sessions.assert_awaited_once()
@pytest.mark.asyncio
async def test_box_service_get_storage_analysis_is_binding_checked_and_scoped():
client = Mock()
client.get_storage_analysis = AsyncMock(return_value={'total_size_bytes': 42, 'directories': []})
service = BoxService(make_app(Mock()), client=client)
service._available = True
result = await service.get_storage_analysis(_CONTEXT)
assert result == {'total_size_bytes': 42, 'directories': []}
client.get_storage_analysis.assert_awaited_once_with(action_context=_ACTION_CONTEXT)
@pytest.mark.asyncio
async def test_box_service_relay_connection_is_binding_checked_and_scoped():
app = make_app(Mock())