Skip to content

Commit

Permalink
Fixing static type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JMkrish committed Apr 29, 2024
1 parent 308a3d6 commit 6944aa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion smsdk/client_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def __init__(
self.auth = Authenticator(self)
self.session = self.auth.session

def login(self, method: str, **kwargs: t_.Any) -> None:
def login(self, method: str, **kwargs: t_.Any) -> bool:
"""
Authenticate with the configured tenant and user credentials.
Expand Down
7 changes: 5 additions & 2 deletions tests/Uri/test_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ def test_basic_create_client_using_tenant() -> None:
cli.config["site.domain"] == "sightmachine.io"
), "Site domain should be set to sightmachine.io"

cli = client.Client(TENANT, protocol="http")
tenant = ""
if TENANT:
tenant = TENANT
cli = client.Client(tenant, protocol="http")
login_result = cli.login("apikey", key_id=API_KEY, secret_id=API_SECRET)

assert login_result is True, "Login should be successful"
assert cli.tenant == TENANT, "Tenant should be initialized correctly"
assert cli.tenant == tenant, "Tenant should be initialized correctly"
assert cli.config["protocol"] == "http", "Protocol should be set to HTTP"
assert (
cli.config["site.domain"] == "sightmachine.io"
Expand Down

0 comments on commit 6944aa3

Please sign in to comment.