♻️ fix temp pytes-ayon dependency to pass tests

This commit is contained in:
Ondřej Samohel 2025-04-16 11:51:06 +02:00
parent 0ada57c25b
commit 2cd692d1da
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
2 changed files with 16 additions and 4 deletions

View file

@ -76,6 +76,7 @@ def sequence_files(tmp_path_factory: pytest.TempPathFactory) -> list[Path]:
def mock_context(
project: pytest_ayon.ProjectInfo,
single_file: Path,
folder_path: Path,
sequence_files: list[Path]) -> pyblish.api.Context:
"""Return a mock instance.
@ -104,6 +105,10 @@ def mock_context(
instance = context.create_instance("mock_instance")
instance.data["source"] = "test_source"
instance.data["families"] = ["render"]
parents = project.folder_entity["path"].lstrip("/").split("/")
hierarchy = "/".join(parents) if parents else ""
instance.data["anatomyData"] = {
"project": {
"name": project.project_name,
@ -121,6 +126,7 @@ def mock_context(
"name": project.product.name,
"type": "test" # pytest-ayon doesn't return the product type yet
},
"hierarchy": hierarchy,
}
instance.data["folderEntity"] = project.folder_entity