Skip to content

Commit 2997fa1

Browse files
chintalamotl
authored andcommitted
Make test_grafana_client_non_json_response more permissive. Update test_grafana_client_no_verify to not break once params are added in.
1 parent 5d3882d commit 2997fa1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_grafana_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from grafana_client.api import GrafanaApi
77
from grafana_client.client import (
88
GrafanaClientError,
9+
GrafanaServerError,
910
GrafanaTimeoutError,
1011
HeaderAuth,
1112
TokenAuth,
@@ -95,6 +96,7 @@ def test_grafana_client_no_verify(self):
9596
auth=basic_auth,
9697
headers=None,
9798
json=None,
99+
params=None,
98100
data=None,
99101
verify=False,
100102
timeout=5.0,
@@ -160,7 +162,7 @@ def test_grafana_client_version(self, mock_get):
160162

161163
def test_grafana_client_non_json_response(self):
162164
grafana = GrafanaApi.from_url("https://example.org/")
163-
self.assertRaises(GrafanaClientError, lambda: grafana.connect())
165+
self.assertRaises((GrafanaClientError, GrafanaServerError), lambda: grafana.connect())
164166

165167
def test_grafana_client_204_no_content_response(self):
166168
grafana = GrafanaApi.from_url()

0 commit comments

Comments
 (0)