From 9662a34fafa587eeb03b3dfd2d2ebf128550f109 Mon Sep 17 00:00:00 2001 From: rjanjua Date: Fri, 17 May 2024 14:42:32 +0100 Subject: [PATCH] add pdf cases for in memory integration tests --- deepset_cloud_sdk/models.py | 4 ++-- .../integration/service/test_integration_files_service.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deepset_cloud_sdk/models.py b/deepset_cloud_sdk/models.py index c843dd5f..598feaf7 100644 --- a/deepset_cloud_sdk/models.py +++ b/deepset_cloud_sdk/models.py @@ -43,7 +43,7 @@ def meta_as_string(self) -> str: class DeepsetCloudFile(DeepsetCloudFileBase): # pylint: disable=too-few-public-methods """Data class for text files in deepset Cloud.""" - def __init__(self, name: str, text: str, meta: Optional[Dict[str, Any]] = None): + def __init__(self, text: str, name: str, meta: Optional[Dict[str, Any]] = None): """ Initialize DeepsetCloudFileBase. @@ -71,7 +71,7 @@ def content(self) -> bytes: class DeepsetCloudFileBytes(DeepsetCloudFileBase): # pylint: disable=too-few-public-methods """Data class for uploading files of any valid type in deepset Cloud.""" - def __init__(self, name: str, file_bytes: bytes, meta: Optional[Dict[str, Any]] = None): + def __init__(self, file_bytes: bytes, name: str, meta: Optional[Dict[str, Any]] = None): """ Initialize DeepsetCloudFileBase. diff --git a/tests/integration/service/test_integration_files_service.py b/tests/integration/service/test_integration_files_service.py index b6e4584a..42a9b25c 100644 --- a/tests/integration/service/test_integration_files_service.py +++ b/tests/integration/service/test_integration_files_service.py @@ -223,8 +223,8 @@ async def test_upload_in_memory(self, integration_config: CommonConfig, workspac write_mode=WriteMode.KEEP, timeout_s=120, ) - assert result.total_files == 5 - assert result.successful_upload_count == 5 + assert result.total_files == 6 + assert result.successful_upload_count == 6 assert result.failed_upload_count == 0 assert len(result.failed) == 0 @@ -252,8 +252,8 @@ async def test_upload_in_memory_less_than_session_threshold( write_mode=WriteMode.KEEP, timeout_s=120, ) - assert result.total_files == 10 - assert result.successful_upload_count == 10 + assert result.total_files == 12 # 6 file contents, and 6 metadata + assert result.successful_upload_count == 12 assert result.failed_upload_count == 0 assert len(result.failed) == 0