Skip to content

Commit 4a3f3a0

Browse files
Merge pull request #10 from rubixchain/arnab/node-url-optional
`node_url` is made default
2 parents da52c74 + 5d15e73 commit 4a3f3a0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

rubix/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from urllib.parse import urljoin
44

55
class RubixClient:
6-
def __init__(self, node_url: str, timeout: int = 300):
6+
def __init__(self, node_url: str = "http://localhost:20000", timeout: int = 300):
77
"""
88
Initialize Rubix client.
99

tests/test_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ def test_client_creation_with_valid_url():
88
client = RubixClient(valid_node_url)
99

1010
assert client is not None
11+
12+
client_default_url = RubixClient()
13+
14+
assert client_default_url is not None
15+
assert client_default_url.node_url == "http://localhost:20000", "Default node URL should be http://localhost:20000"

0 commit comments

Comments
 (0)