Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
prowler-cloud avatar

Prowler Test Api

  • 66 installs
  • 14.5k repo stars
  • Updated August 4, 2026
  • prowler-cloud/prowler

Helps with testing & qa tasks.

About

prowler-test-api is a Claude Code skill for testing & qa. It helps solo builders move faster with AI-assisted development.

  • prowler-test-api
  • Testing & QA
  • AI-coding skill

Prowler Test Api by the numbers

  • 66 all-time installs (skills.sh)
  • Ranked #1,117 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/prowler-cloud/prowler --skill prowler-test-api

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs66
repo stars14.5k
Last updatedAugust 4, 2026
Repositoryprowler-cloud/prowler

What it does

Helps with testing & qa tasks.

Files

SKILL.mdMarkdownGitHub ↗

Critical Rules

  • ALWAYS use response.json()["data"] not response.data
  • ALWAYS use content_type = "application/vnd.api+json" for PATCH/PUT requests
  • ALWAYS use format="vnd.api+json" for POST requests
  • ALWAYS test cross-tenant isolation - RLS returns 404, NOT 403
  • NEVER skip RLS isolation tests when adding new endpoints
  • NEVER use realistic-looking API keys in tests (TruffleHog will flag them)
  • ALWAYS mock BOTH .delay() AND Task.objects.get for async task tests

---

1. Fixture Dependency Chain

create_test_user (session) ─► tenants_fixture (function) ─► authenticated_client
                                     │
                                     └─► providers_fixture ─► scans_fixture ─► findings_fixture

Key Fixtures

FixtureDescription
create_test_userSession user (dev@prowler.com)
tenants_fixture3 tenants: [0],[1] have membership, [2] isolated
authenticated_clientJWT client for tenant[0]
providers_fixture9 providers in tenant[0]
tasks_fixture2 Celery tasks with TaskResult

RBAC Fixtures

FixturePermissions
authenticated_client_rbacAll permissions (admin)
authenticated_client_rbac_norolesMembership but NO roles
authenticated_client_no_permissions_rbacAll permissions = False

---

2. JSON:API Requests

POST (Create)

response = client.post(
    reverse("provider-list"),
    data={"data": {"type": "providers", "attributes": {...}}},
    format="vnd.api+json",  # NOT content_type!
)

PATCH (Update)

response = client.patch(
    reverse("provider-detail", kwargs={"pk": provider.id}),
    data={"data": {"type": "providers", "id": str(provider.id), "attributes": {...}}},
    content_type="application/vnd.api+json",  # NOT format!
)

Reading Responses

data = response.json()["data"]
attrs = data["attributes"]
errors = response.json()["errors"]  # For 400 responses

---

3. RLS Isolation (Cross-Tenant)

RLS returns 404, NOT 403 - the resource is invisible, not forbidden.

def test_cross_tenant_access_denied(self, authenticated_client, tenants_fixture):
    other_tenant = tenants_fixture[2]  # Isolated tenant
    foreign_provider = Provider.objects.create(tenant_id=other_tenant.id, ...)

    response = authenticated_client.get(reverse("provider-detail", args=[foreign_provider.id]))
    assert response.status_code == status.HTTP_404_NOT_FOUND  # NOT 403!

---

4. Celery Task Testing

Testing Strategies

StrategyUse For
Mock .delay() + Task.objects.getTesting views that trigger tasks
task.apply()Synchronous task logic testing
Mock chain/groupTesting Canvas orchestration
Mock connectionTesting @set_tenant decorator
Mock apply_asyncTesting Beat scheduled tasks

Why NOT task_always_eager

ProblemImpact
No task serializationMisses argument type errors
No broker interactionHides connection issues
Different execution contextself.request behaves differently

Instead, use: task.apply() for sync execution, mocking for isolation.

Full examples: See assets/api_test.py for TestCeleryTaskLogic, TestCeleryCanvas, TestSetTenantDecorator, TestBeatScheduling.

---

5. Fake Secrets (TruffleHog)

# BAD - TruffleHog flags these:
api_key = "sk-test1234567890T3BlbkFJtest1234567890"

# GOOD - obviously fake:
api_key = "sk-fake-test-key-for-unit-testing-only"

---

6. Response Status Codes

ScenarioCode
Successful GET200
Successful POST201
Async operation (DELETE/scan trigger)202
Sync DELETE204
Validation error400
Missing permission (RBAC)403
RLS isolation / not found404

---

Commands

cd api && uv run pytest -x --tb=short
cd api && uv run pytest -k "test_provider"
cd api && uv run pytest api/src/backend/api/tests/test_rbac.py

---

Resources

  • Full Examples: See assets/api_test.py for complete test patterns
  • Fixture Reference: See references/test-api-docs.md
  • Fixture Source: api/src/backend/conftest.py

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.