<filename>management_api_app/tests_ma/conftest.py
import pytest

from models.domain.resource_template import ResourceTemplate, ResourceType
from models.schemas.workspace_template import WorkspaceTemplateInCreate


@pytest.fixture
def input_workspace_template():
    return WorkspaceTemplateInCreate(
        name="my-tre-workspace",
        version="0.0.1",
        current=True,
        json_schema={
            "$schema": "http://json-schema.org/draft-07/schema",
            "$id": "https://github.com/microsoft/AzureTRE/templates/workspaces/myworkspace/workspace.json",
            "type": "object",
            "title": "My Workspace Template Custom Parameters",
            "description": "These parameters are specific to my workspace template",
            "required": [],
            "properties": {}
        })


@pytest.fixture
def basic_resource_template(input_workspace_template):
    return ResourceTemplate(
        id="1234-5678",
        name=input_workspace_template.name,
        description=input_workspace_template.json_schema["description"],
        version=input_workspace_template.name,
        resourceType=ResourceType.Workspace,
        current=True,
        required=input_workspace_template.json_schema["required"],
        properties=input_workspace_template.json_schema["properties"]
    )
