diff --git a/tests/test_client.py b/tests/test_client.py index 734bc4c..c1471df 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -20,9 +20,12 @@ def test_board_departure(api_client: Client, sample_stop_id: str): def test_him_search(api_client: Client): - assert isinstance( - api_client.him_search(time_end=datetime.now() + timedelta(days=10))[0], Message - ) + response = api_client.him_search(time_end=datetime.now() + timedelta(days=10)) + + if len(response) != 0: + assert isinstance(response[0], Message) + else: + assert isinstance(response, list) def test_journey_detail(api_client: Client, sample_journey_id: str):