docs: Add missing docstrings and fix terminology warnings

This commit is contained in:
DSS
2025-12-11 06:31:06 -03:00
parent bcd1a86ae4
commit 42b146ca02
9 changed files with 179 additions and 28 deletions

View File

@@ -13,6 +13,11 @@ from dss.models.component import AtomicType
# Mock Figma client with async context manager and async methods
class MockAsyncClient:
"""
Mocks the IntelligentFigmaClient for testing purposes.
Simulates an async context manager and provides mock async methods
for Figma API calls.
"""
def __init__(self, *args, **kwargs):
pass
@@ -23,6 +28,9 @@ class MockAsyncClient:
pass
async def get_file(self, file_key: str):
"""
Mocks the async get_file method to return a predefined Figma document structure.
"""
return {
"document": {
"id": "0:0",
@@ -62,6 +70,9 @@ class MockAsyncClient:
}
async def get_file_variables(self, file_key: str):
"""
Mocks the async get_file_variables method to return empty variables.
"""
return {"meta": {"variables": {}, "variableCollections": {}}}
@@ -69,7 +80,8 @@ class MockAsyncClient:
def test_figma_component_extraction():
"""
Test that the Figma ingestion source correctly extracts and classifies
components from a mock Figma file.
components from a mock Figma file structure. It verifies that the recursive
component discovery works and assigns correct AtomicType classifications.
"""
source = FigmaTokenSource(figma_token="fake_token")