def test_get_graph_notification_image(web, graph_test_config): result = web.get("ajax_graph_images.py?host=test-host-get-graph&service=Check_MK") # Provides a json list containing base64 encoded PNG images of the current 24h graphs encoded_graph_list = json.loads(result.text) assert isinstance(encoded_graph_list, list) assert len(encoded_graph_list) > 0 for encoded_graph_image in encoded_graph_list: graph_image = base64.b64decode(encoded_graph_image) assert graph_image.startswith(b'\x89PNG') try: Image.open(BytesIO(graph_image)) except IOError: raise Exception("Failed to open image: %r" % graph_image)
def test_global_settings(site, web): r = web.get("wato.py") assert "Global Settings" in r.text
def test_global_settings(site, web): # noqa: F811 # pylint: disable=redefined-outer-name r = web.get("wato.py?mode=globalvars") assert "Global settings" in r.text
def test_01_login(site, web): r = web.get(site.url + "wato.py") assert "Global Settings" in r.text
def test_02_logout(site, web): web.logout() r = web.get(site.url + "wato.py") assert "Global Settings" not in r.text