mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
♻️ fix temp pytes-ayon dependency to pass tests
This commit is contained in:
parent
0ada57c25b
commit
2cd692d1da
2 changed files with 16 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue