Skip to content

Commit

Permalink
Make test_grafana_client_non_json_response more permissive. Update te…
Browse files Browse the repository at this point in the history
…st_grafana_client_no_verify to not break once params are added in.
  • Loading branch information
chintal committed Apr 12, 2024
1 parent 0fef856 commit d9f7110
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_grafana_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from grafana_client.api import GrafanaApi
from grafana_client.client import (
GrafanaClientError,
GrafanaServerError,
GrafanaTimeoutError,
HeaderAuth,
TokenAuth,
Expand Down Expand Up @@ -95,6 +96,7 @@ def test_grafana_client_no_verify(self):
auth=basic_auth,
headers=None,
json=None,
params=None,
data=None,
verify=False,
timeout=5.0,
Expand Down Expand Up @@ -160,7 +162,7 @@ def test_grafana_client_version(self, mock_get):

def test_grafana_client_non_json_response(self):
grafana = GrafanaApi.from_url("https://example.org/")
self.assertRaises(GrafanaClientError, lambda: grafana.connect())
self.assertRaises((GrafanaClientError, GrafanaServerError), lambda: grafana.connect())

def test_grafana_client_204_no_content_response(self):
grafana = GrafanaApi.from_url()
Expand Down

0 comments on commit d9f7110

Please sign in to comment.