Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2023-08-17 14:13:56 -07:00
parent 755a4fd789
commit 1e693890ef
6 changed files with 1981 additions and 6 deletions

View File

@ -167,6 +167,42 @@ async def test_file_convert_stl_async():
assert len(b) > 0
@pytest.mark.asyncio
async def test_file_convert_obj_async():
# Create our client.
client = ClientFromEnv()
dir_path = os.path.dirname(os.path.realpath(__file__))
file = open(os.path.join(dir_path, "../assets/ORIGINALVOXEL-3.obj"), "rb")
content = file.read()
file.close()
# Get the fc.
result: Union[
Tuple[FileConversion, bytes], Error, None
] = await create_file_conversion_with_base64_helper.asyncio(
client=client,
body=content,
src_format=FileImportFormat.OBJ,
output_format=FileExportFormat.STL,
)
r: Tuple[FileConversion, bytes] = result # type: ignore
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.
client = ClientFromEnv()