diff --git a/tests/client/client_test.py b/tests/client/client_test.py index 0e4d036..8afb121 100644 --- a/tests/client/client_test.py +++ b/tests/client/client_test.py @@ -554,14 +554,17 @@ def test_get_data_source_success(pyband_client): def test_get_data_source_invalid(pyband_client): - with pytest.raises(ValueError): - pyband_client.get_data_source(-1) + with pytest.raises(grpc.RpcError): + pyband_client.get_data_source(0) def test_get_data_source_invalid_input(pyband_client): with pytest.raises(TypeError): pyband_client.get_data_source("hi") + with pytest.raises(ValueError): + pyband_client.get_data_source(-1) + def test_get_oracle_script_success(pyband_client): oracle_script = pyband_client.get_oracle_script(1) @@ -577,14 +580,17 @@ def test_get_oracle_script_success(pyband_client): def test_get_oracle_script_invalid(pyband_client): - with pytest.raises(ValueError): - pyband_client.get_oracle_script(-1) + with pytest.raises(grpc.RpcError): + pyband_client.get_oracle_script(0) def test_get_oracle_script_invalid_input(pyband_client): with pytest.raises(TypeError): pyband_client.get_oracle_script("hi") + with pytest.raises(ValueError): + pyband_client.get_oracle_script(-1) + def test_get_request_by_id_success(pyband_client): response = pyband_client.get_request_by_id(1) @@ -642,6 +648,9 @@ def test_get_request_by_id_invalid_input(pyband_client): with pytest.raises(TypeError): pyband_client.get_request_by_id("hi") + with pytest.raises(ValueError): + pyband_client.get_request_by_id(-1) + def test_get_request_by_id_not_found(pyband_client): with pytest.raises(grpc.RpcError): @@ -649,8 +658,8 @@ def test_get_request_by_id_not_found(pyband_client): def test_get_request_by_id_invalid(pyband_client): - with pytest.raises(ValueError): - pyband_client.get_request_by_id(-1) + with pytest.raises(grpc.RpcError): + pyband_client.get_request_by_id(0) def test_get_reporters_success(pyband_client):