We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tumf/grafana-loki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_parse_grafana_time_invalid_unit.py•557 B
"""
Tests for the parse_grafana_time function with invalid unit.
"""
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from grafana_loki_mcp.server import parse_grafana_time
def test_parse_grafana_time_invalid_unit() -> None:
"""Test parse_grafana_time with invalid unit."""
result = parse_grafana_time("now-1z") # Invalid unit 'z'
# Should return current time as Unix nanoseconds string
assert result.isdigit()
assert len(result) >= 18 # Unix nanoseconds should be 19 digits