Skip to content

Commit

Permalink
Update and modify files for the project
Browse files Browse the repository at this point in the history
- Updated files:
  - src/bee_py/bee.py
  - tests/unit/test_bee.py
  • Loading branch information
Aviksaikat committed Dec 17, 2023
1 parent 2e29f5f commit db7a2d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/bee_py/bee.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
)
from bee_py.utils.bytes import wrap_bytes_with_helpers
from bee_py.utils.collection import assert_collection, make_collection_from_file_list

# from bee_py.utils.collection_node import make_collection_from_fs
from bee_py.utils.data import prepare_websocket_data
from bee_py.utils.error import BeeArgumentError, BeeError
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_bee.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

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,
Expand Down Expand Up @@ -691,7 +692,6 @@ def test_get_all_tags_invalid_limit(invalid_limit, expected_exception):
bee.get_all_tags({"limit": invalid_limit}) # type: ignore


# ! WHY god
@pytest.mark.parametrize(
"invalid_offset, expected_exception",
[
Expand Down Expand Up @@ -945,16 +945,16 @@ def test_get_json_feed_request_options_assertion(input_value, expected_error_typ
bee.get_json_feed(TOPIC, opts)


def test_download_data_mock(mock_bee, requests_mock, test_json_payload, test_identity_address, signer, test_json_hash):
def test_fetch_with_specified_address(
mock_bee, requests_mock, test_json_payload, test_identity_address, signer, test_json_hash
):
mock_bee.return_value.download_data.return_value = MagicMock(text=test_json_payload)

requests_mock.get(
"http://localhost:12345/bytes/872a858115b8bee4408b1427b49e472883fdc2512d5a8f2d428b97ecc8f7ccfa",
json=test_json_payload,
)

# ! make fetchFeedUpdateMock fetch first
# print(HASHED_TOPIC)
requests_mock.get(
"http://localhost:12345/feeds/0x1e59ce931B4CFea3fe4B875411e280e173cB7A9C/419e2aec53506dd705967918ae1aa0f6788102bffc0403a12c9816e8343f8635?type=sequence", # type: ignore # noqa: 501
json={"reference": test_json_hash},
Expand Down

0 comments on commit db7a2d5

Please sign in to comment.