Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mephenor committed Oct 1, 2024
1 parent 03cf53b commit e030a8c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cors_allowed_headers: null
cors_allowed_methods: null
cors_allowed_origins: null
db_connection_str: '**********'
db_name: dev_db
db_name: dev
docs_url: /docs
file_registered_event_topic: internal_file_registry
file_registered_event_type: file_registered
Expand Down
4 changes: 2 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ components:
title: File Id
type: string
sha256_hash:
description: SHA256 hash of the unencrypted file content encoded as hexadecimal values
as produced by hashlib.hexdigest().
description: SHA256 hash of the unencrypted file content encoded as hexadecimal
values as produced by hashlib.hexdigest().
title: Sha256 Hash
type: string
size:
Expand Down
6 changes: 2 additions & 4 deletions src/dins/core/information_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ async def deletion_requested(self, file_id: str):
await self._file_information_dao.get_by_id(id_=file_id)
except ResourceNotFoundError:
log.info(
f"Information for file with id '{
file_id}' has already been deleted."
f"Information for file with id '{file_id}' has already been deleted."
)
return

Expand Down Expand Up @@ -78,8 +77,7 @@ async def serve_information(self, file_id: str) -> FileInformation:
"""Retrieve stored public information for the given file ID to be served by the API."""
try:
file_information = await self._file_information_dao.get_by_id(file_id)
log.debug(f"Information for file {
file_information.file_id} found.")
log.debug(f"Information for file {file_information.file_id} found.")
except ResourceNotFoundError as error:
information_not_found = self.InformationNotFoundError(file_id=file_id)
log.warning(information_not_found)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_typical_journey.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ async def test_normal_journey(
assert expected_message in caplog.messages

# Test reregistration of mismatching content
mismatch_message = f"Mismatching information for the file with ID {
file_id} has already been registered."
mismatch_message = f"Mismatching information for the file with ID {file_id}"
"has already been registered."
mismatch_mock = INCOMING_PAYLOAD_MOCK.model_copy(
update={"decrypted_sha256": "other-fake-checksum"}
)
Expand Down

0 comments on commit e030a8c

Please sign in to comment.