{"enrichment":{"faq":[{"a":"prowler-test-api covers JSON:API request/response patterns including proper Content-Type headers (application/vnd.api+json), PATCH and POST formatting with data envelopes, and relationship links. Tests validate that Prowler API endpoints serialize resources correctly, handle sparse fieldsets, and return standardized error objects. The skill includes fixtures for common resource types and demonstrates how to assert on response structure rather than raw JSON.","q":"What are prowler api testing patterns for JSON:API compliance?"},{"a":"prowler-test-api teaches cross-tenant access control by writing tests that verify row-level security (RLS) blocks unauthorized access. Key pattern: authenticated requests from Tenant A should return 404 (not 403) for Tenant B resources, signaling the resource doesn't exist in that tenant's scope. Fixtures establish separate tenants with distinct API keys; tests confirm queries, mutations, and list endpoints respect tenant boundaries without leaking data or permission hints.","q":"How do you test multi-tenant isolation and RLS in prowler-test-api?"},{"a":"prowler-test-api demonstrates mocking Celery tasks using pytest fixtures and task_always_eager mode for synchronous execution in tests. The skill shows patching task.apply and task.delay calls, capturing task arguments, and asserting side effects. For complex workflows, it covers mocking canvas primitives (chain, group) and validating that view code enqueues tasks with correct parameters without executing actual async work.","q":"How should you mock Celery async tasks in Django views with prowler-test-api?"},{"a":"prowler-test-api establishes secure test fixtures by using placeholder tokens (e.g., 'test-key-' prefixes) that don't match real secret patterns, storing sensitive test data in environment variables or .env.test files excluded from version control, and using factory libraries to generate deterministic but non-production credentials. The skill avoids hardcoding real API keys and demonstrates how to configure TruffleHog allowlists for known test patterns.","q":"What fixture patterns does prowler-test-api use to avoid TruffleHog detection?"},{"a":"prowler-test-api organizes RBAC tests by creating users with distinct roles (admin, viewer, editor) in fixtures, then writing parameterized tests that verify each role's access to endpoints. Tests assert that unauthorized roles receive 403 Forbidden, permitted roles succeed, and viewset serializers respect permission classes. The skill includes examples of custom permission classes integrated with DjangoRestFramework and patterns for testing role transitions.","q":"How do you structure RBAC permission tests in prowler-test-api fixtures?"},{"a":"prowler-test-api emphasizes setting Content-Type: application/vnd.api+json for all JSON:API requests and validating responses include the same header. For response extraction, the skill teaches accessing data via response.json()['data'] for single resources or response.json()['data'][0] for collections, then asserting on attributes, relationships, and included resources. Error responses use response.json()['errors'] for validation testing.","q":"What Content-Type headers and response extraction patterns does prowler-test-api teach?"}],"shadow_tags":["api-testing-patterns","multi-tenant-isolation","async-task-mocking","rbac-fixtures","json-api-compliance","django-rest-framework","celery-orchestration","trufflehog-safe-secrets","cross-tenant-security"],"summary_rewrite":"This skill equips you with battle-tested patterns for writing Prowler API tests, covering JSON:API request formatting, cross-tenant isolation via row-level security, role-based access control, and Celery task mocking. It includes a fixture dependency chain, response status code reference, and explicit rules for avoiding common pitfalls like TruffleHog false positives and incorrect content-type headers."},"files":[{"bytes":5733,"path":"skills/prowler-test-api/SKILL.md","sha256":"34e95bb2dcd203a5277743520d867b2678496d8f737dc2458883af0a9a1e5be4","url":"https://skillfed.io/files/prowler-cloud/prowler/prowler-test-api/de3012bb/SKILL.md"}],"id":"prowler-cloud/prowler/prowler-test-api","links":{"html":"https://skillfed.io/prowler-cloud/prowler/prowler-test-api","md":"https://skillfed.io/prowler-cloud/prowler/prowler-test-api.md","repo":"https://github.com/prowler-cloud/prowler"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":2285,"language":"Python","last_updated":"2026-07-27","license":"Apache-2.0","name":"prowler-test-api","publisher":"prowler-cloud","stars":14491},"relations":{"similar":[{"id":"prowler-cloud/prowler/prowler-api"},{"id":"prowler-cloud/prowler/jsonapi"},{"id":"prowler-cloud/prowler/django-migration-psql"},{"id":"prowler-cloud/prowler/pytest"},{"id":"prowler-cloud/prowler/prowler"},{"id":"prowler-cloud/prowler/django-drf"},{"id":"prowler-cloud/prowler/prowler-commit"},{"id":"prowler-cloud/prowler/prowler-changelog"},{"id":"prowler-cloud/prowler/prowler-mcp"},{"id":"prowler-cloud/prowler/prowler-docs"}]},"slug":{"owner":"prowler-cloud","repo":"prowler","skill":"prowler-test-api"},"version":"de3012bb"}
