Skip to content

Commit

Permalink
moved string check to None
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Sep 6, 2024
1 parent d608a06 commit c631097
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blueapi/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get_task(self, task_id: str) -> TrackableTask[Task]:
Returns:
TrackableTask[Task]: Task details
"""
assert task_id != "", "Task ID cannot be empty"
assert task_id, "Task ID not provided!"
return self._rest.get_task(task_id)

def get_all_tasks(self) -> TasksListResponse:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/client/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_get_nonexistent_task(
def test_get_task_with_empty_id(client: BlueapiClient):
with pytest.raises(AssertionError) as exc:
client.get_task("")
assert str(exc) == "Task ID cannot be empty"
assert str(exc) == "Task ID not provided!"


def test_get_all_tasks(
Expand Down

0 comments on commit c631097

Please sign in to comment.