Skip to main content
Glama

n8n MCP Server

by CodeHalwell
test_rate_limiter.py791 B
from __future__ import annotations import time import pytest from pytest import MonkeyPatch from core.rate_limiter import RateLimiter, RateLimitExceeded def test_rate_limiter_allows_within_window(monkeypatch: MonkeyPatch) -> None: limiter = RateLimiter(max_per_minute=2) limiter.check("actor") limiter.check("actor") # Move time forward so the window expires and the bucket is drained. current = time.time() def fake_time() -> float: return current monkeypatch.setattr(time, "time", lambda: current) current += 120 limiter.check("actor") def test_rate_limiter_raises_when_exceeded() -> None: limiter = RateLimiter(max_per_minute=1) limiter.check("actor") with pytest.raises(RateLimitExceeded): limiter.check("actor")

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CodeHalwell/n8n-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server