Skip to content

Commit

Permalink
Merge pull request #478 from CBoYXD/feat/add_workflows_on_pr
Browse files Browse the repository at this point in the history
Add event on pull request
  • Loading branch information
djeck1432 authored Feb 26, 2025
2 parents bf34002 + 956d74a commit 603a187
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI Workflow

on: [push]
on: [push, pull_request]


jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dashboard_app_ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: DashBoard App CI Workflow

on: [push]
on: [push, pull_request]

jobs:
run_tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dashboard_app_pylint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Dashboard App

on: [push]
on: [push, pull_request]

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk_app_ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: SDK testing workflow

on: [push]
on: [push, pull_request]

jobs:
run_tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wep_app_ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Web App CI Workflow

on: [push]
on: [push, pull_request]

jobs:
run_tests:
Expand Down
9 changes: 4 additions & 5 deletions apps/shared/tests/test_starknet_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from starknet_py.hash.selector import get_selector_from_name
from starknet_py.net.client_models import Call
from starknet_py.net.networks import Network

from shared.starknet_client import StarknetClient

Expand All @@ -19,7 +18,7 @@ class TestStarknetClient:
@pytest.fixture(autouse=True)
def setup(self):
"""Setup test environment with mocked Network"""
self.network_patcher = patch('shared.starknet_client.Network')
self.network_patcher = patch('shared.starknet_client.FullNodeClient')
self.mock_network_class = self.network_patcher.start()
self.mock_network = Mock()
self.mock_network.call_contract = AsyncMock()
Expand All @@ -31,12 +30,12 @@ def test_initialization(self):
"""Test client initialization"""
# Test default URL
StarknetClient()
self.mock_network_class.assert_called_with("https://starknet-mainnet.public.blastapi.io")
self.mock_network_class.assert_called_with(node_url="https://starknet-mainnet.public.blastapi.io")

# Test custom URL
self.mock_network_class.reset_mock()
StarknetClient(TEST_NODE_URL)
self.mock_network_class.assert_called_with(TEST_NODE_URL)
self.mock_network_class.assert_called_with(node_url=TEST_NODE_URL)

@pytest.mark.asyncio
async def test_func_call(self):
Expand All @@ -55,7 +54,7 @@ async def test_func_call(self):
selector=get_selector_from_name("test_function"),
calldata=[1, 2, 3]
)
self.mock_network.call_contract.assert_called_with(expected_call)
self.mock_network.call_contract.assert_called_with(expected_call, block_hash='latest')
assert result == [100]

@pytest.mark.asyncio
Expand Down

0 comments on commit 603a187

Please sign in to comment.