Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gr0vity-dev committed Oct 17, 2023
1 parent 6679b9f commit 64098cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ testpaths = .
addopts = -vv --durations=10 -m "not nanolocal"
markers =
nanolocal: marks tests as nanolocal
asyncio : run asycio
asyncio : run asycio
6 changes: 3 additions & 3 deletions unit_tests/test_block_asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def test_assert_blocks_confirmed_wait(block_asserts):


@pytest.mark.asyncio
async def test_assert_blocks_confirmed(block_asserts):
async def test_assert_blocks_confirmed_2(block_asserts):
block_hashes = ["block_hash1", "block_hash2", "block_hash3"]

# Create futures with the desired results
Expand All @@ -145,7 +145,7 @@ def side_effect(block_hash):


@pytest.mark.asyncio
async def test_assert_blocks_confirmed_wait(block_asserts):
async def test_assert_blocks_confirmed_wait_2(block_asserts):
block_hashes = ["block_hash1"]
wait_s = 1
interval = 0.3
Expand Down Expand Up @@ -177,7 +177,7 @@ async def test_assert_blocks_confirmed_wait(block_asserts):


@pytest.mark.asyncio
async def test_assert_blocks_confirmed_wait(block_asserts):
async def test_assert_blocks_confirmed_wait_3(block_asserts):
block_hashes = ["block_hash1", "block_hash2"]
wait_s = 2
interval = 0.3
Expand Down
3 changes: 1 addition & 2 deletions unit_tests/test_rpc_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def test_fetch_logs_timeout(mock_version, mock_fully_cemented):
logger = RPCLogger(node_name="test_node",
rpc_url="http://test_url",
expected_blocks_count=500000,
timeout=0.3)
timeout=1)
logs = []
async for log in logger.fetch_logs():
logs.append(log)
Expand All @@ -90,7 +90,6 @@ async def test_fetch_logs_timeout(mock_version, mock_fully_cemented):
def test_case_with_different_version(mock_fully_cemented):
with patch('nanomock.modules.nl_rpc.NanoRpc.version',
return_value=None) as mock_version:
# rest of the test case...
logger = RPCLogger(node_name="test_node",
rpc_url="http://test_url",
expected_blocks_count=99,
Expand Down

0 comments on commit 64098cc

Please sign in to comment.