Update api spec (#124)

* YOYO NEW API SPEC!

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* tuples

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates;

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-08-17 12:48:13 -07:00
committed by GitHub
parent 3cde65018e
commit 9921f5a9f3
97 changed files with 2225 additions and 409 deletions

View File

@ -1,5 +1,5 @@
import os
from typing import Union
from typing import Tuple, Union
import pytest
@ -107,7 +107,7 @@ def test_file_convert_stl():
# Get the fc.
result: Union[
FileConversion, Error, None
Tuple[FileConversion, bytes], Error, None
] = create_file_conversion_with_base64_helper.sync(
client=client,
body=content,
@ -115,18 +115,21 @@ def test_file_convert_stl():
output_format=FileExportFormat.OBJ,
)
assert isinstance(result, FileConversion)
r: Tuple[FileConversion, bytes] = result # type: ignore
fc: FileConversion = result
b: bytes = r[1]
fc: FileConversion = r[0]
print(f"FileConversion: {fc}")
assert fc.id is not None
assert fc.status == ApiCallStatus.COMPLETED
print(f"FileConversion: {fc}")
# Make sure the bytes are not empty.
assert len(b) > 0
@pytest.mark.asyncio
async def test_file_convert_stl_async():
@ -140,7 +143,7 @@ async def test_file_convert_stl_async():
# Get the fc.
result: Union[
FileConversion, Error, None
Tuple[FileConversion, bytes], Error, None
] = await create_file_conversion_with_base64_helper.asyncio(
client=client,
body=content,
@ -148,16 +151,21 @@ async def test_file_convert_stl_async():
output_format=FileExportFormat.OBJ,
)
assert isinstance(result, FileConversion)
r: Tuple[FileConversion, bytes] = result # type: ignore
fc: FileConversion = result
b: bytes = r[1]
fc: FileConversion = r[0]
print(f"FileConversion: {fc}")
assert fc.id is not None
assert fc.status == ApiCallStatus.COMPLETED
print(f"FileConversion: {fc}")
# Make sure the bytes are not empty.
assert len(b) > 0
def test_file_mass():
# Create our client.