docs: Add missing docstrings and fix terminology warnings
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user