-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and modify files for the project
- Added new files: - tests/integration/test_bee_integration.py - Updated files: - pyproject.toml - src/bee_py/bee.py - src/bee_py/modules/chunk.py - tests/conftest.py
- Loading branch information
1 parent
bdbea1a
commit 49869ec
Showing
5 changed files
with
50 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# from unittest.mock import MagicMock, patch | ||
|
||
# import pydantic | ||
import pytest | ||
|
||
from bee_py.bee import Bee | ||
from bee_py.feed.topic import make_topic_from_string | ||
from bee_py.feed.type import FeedType | ||
from bee_py.types.type import ( | ||
CHUNK_SIZE, | ||
REFERENCE_HEX_LENGTH, | ||
SPAN_SIZE, | ||
BatchId, | ||
BeeRequestOptions, | ||
CollectionUploadOptions, | ||
PssMessageHandler, | ||
ReferenceResponse, | ||
UploadOptions, | ||
) | ||
from bee_py.utils.error import BeeArgumentError, BeeError | ||
|
||
# * Global variables | ||
|
||
|
||
def test_strip_trailing_slash(): | ||
bee = Bee("http://127.0.0.1:1633/") | ||
|
||
assert bee.url == "http://127.0.0.1:1633" | ||
|
||
|
||
def test_upload_and_downalod_chunk(bee_class, get_debug_postage): | ||
content = bytes(bytearray(100)) | ||
|
||
referece = bee_class.upload_chunk(get_debug_postage, content) | ||
downloaded_chunk = bee_class.download_chunk(referece) | ||
|
||
assert downloaded_chunk == content |