tests: add test for creating machine on minimal clan

This commit is contained in:
DavHau
2024-06-09 02:38:19 -07:00
parent 1eaf6cec39
commit 07fb01d9db
6 changed files with 57 additions and 10 deletions

View File

@@ -179,12 +179,15 @@ def type_to_dict(t: Any, scope: str = "", type_map: dict[TypeVar, type] = {}) ->
raise JSchemaTypeError(
f"Usage of the Any type is not supported for API functions. In: {scope}"
)
if t is pathlib.Path:
return {
# TODO: maybe give it a pattern for URI
"type": "string",
}
if t is dict:
raise JSchemaTypeError(
"Error: generic dict type not supported. Use dict[str. Any] instead"
)
# Optional[T] gets internally transformed Union[T,NoneType]
if t is NoneType: