Skip to content

Commit

Permalink
Update and modify files for the project
Browse files Browse the repository at this point in the history
- Added new files:
  - tests/integration/chunk/test_soc_integration.py
- Updated files:
  - src/bee_py/modules/bytes.py
  - src/bee_py/modules/debug/chunk.py
  - tests/conftest.py
  - tests/integration/chunk/test_soc_int.py
  • Loading branch information
Aviksaikat committed Dec 9, 2023
1 parent 86e6dd3 commit 55a4142
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
12 changes: 2 additions & 10 deletions src/bee_py/modules/bytes.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import struct
from typing import Optional, Union

from bee_py.types.type import (
BatchId,
BeeRequestOptions,
Data,
Reference,
ReferenceOrENS,
UploadOptions,
UploadResult,
)
from bee_py.types.type import BatchId, BeeRequestOptions, Data, Reference, ReferenceOrENS, UploadOptions, UploadResult
from bee_py.utils.bytes import wrap_bytes_with_helpers
from bee_py.utils.headers import extract_upload_headers
from bee_py.utils.http import http
Expand Down Expand Up @@ -52,7 +44,7 @@ def upload(
logger.error(response.raise_for_status())

upload_response = response.json()
reference = Reference(upload_response["reference"])
reference = Reference(value=upload_response["reference"])
tag_uid = None

if "swarm-tag" in response.headers:
Expand Down
2 changes: 1 addition & 1 deletion src/bee_py/modules/debug/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ def delete_chunk_from_local_storage(
msg = f"Failed to delete chunk: {status_code}"
raise ValueError(msg)

return BeeGenericResponse(json.loads(response.text), status_code)
return BeeGenericResponse.model_validate_json(response.text)
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def get_debug_postage(printer, bee_debug_ky_options) -> BatchId:
stamp: BatchId

printer("[*]Getting Debug Postage....")
# return "0717e834668a3da917dacacacab61ca5a3ea1e5411e1e3d2de5f96a9fb8a0a0d"
return "75971c97ba6bbf7ecf429ffab1955c8ed5d2d8622c238cfa52b55451ecef4516"

# if read_local_bee_stamp:
# printer(read_local_bee_stamp)
Expand All @@ -164,7 +164,7 @@ def get_peer_debug_postage(printer, bee_peer_debug_ky_options) -> BatchId:

# if read_local_bee_peer_stamp:
# return read_local_bee_peer_stamp
# return "6be2b2aacd687180a109d960cb9b1da0b446f4fca3966c6b7fdd84e6d9fdad52"
return "9d453ebb73b2fedaaf44ceddcf7a0aa37f3e3d6453fea5841c31f0ea6d61dc85"

printer("[*]Getting Debug Postage....")
stamp = create_postage_batch(bee_peer_debug_ky_options, 100, 20)
Expand Down
File renamed without changes.

0 comments on commit 55a4142

Please sign in to comment.