Skip to content

Commit

Permalink
add pdf cases for in memory integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjanjua committed May 17, 2024
1 parent 4e1acf0 commit 9662a34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deepset_cloud_sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/service/test_integration_files_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9662a34

Please sign in to comment.