.cursor/skills/local-dev/SKILL.md
How to run unit tests, linting, and type checking for local development
npx skillsauth add RedHatInsights/insights-rbac local-devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to run unit tests, linting, and type checking for the insights-rbac project.
Run tests with coverage:
tox -e py312
Run tests without coverage (faster):
tox -e py312-fast
Run tests and show slowest tests:
tox -e py312-profile
Run a specific test:
tox -e py312 -- tests.module.path.TestClass.test_method
Run a specific test with keepdb (faster, reuses existing test database):
tox -e py312 -- tests.module.path.TestClass.test_method --keepdb
Run all tests in a test file:
tox -e py312 -- tests.module.path
Run all tests in a test class:
tox -e py312 -- tests.module.path.TestClass
Run Django tests directly:
make unittest
Run fast tests (without coverage):
make unittest-fast
Run tests with profiling:
make unittest-profile
Run linting checks (flake8 and black):
tox -e lint
Run linting:
make lint
Format code (fix linting errors):
make format
Run type checking with mypy:
tox -e mypy
Run type checking:
make typecheck
| Task | Tox Command | Make Command |
|------|-------------|--------------|
| Run tests with coverage | tox -e py312 | make unittest |
| Run tests (fast, no coverage) | tox -e py312-fast | make unittest-fast |
| Profile slow tests | tox -e py312-profile | make unittest-profile |
| Run specific test | tox -e py312 -- tests.module.path.TestClass.test_method | N/A |
| Run specific test (keepdb) | tox -e py312 -- tests.module.path.TestClass.test_method --keepdb | N/A |
| Run linting | tox -e lint | make lint |
| Format code | N/A | make format |
| Type checking | tox -e mypy | make typecheck |
tox commands automatically provision the pipenv environment before running testsmake format to automatically fix formatting issues found by blackpy312-fast environment runs tests in parallel with --failfast flag for faster feedbackdocker-compose up -d db)testing
Run Zed permission checks against SpiceDB in Kessel stage. Use when checking RBAC permissions in SpiceDB, verifying group membership, workspace access for users, or running zed permission check/lookup-resources against stage.
development
Query relationships in SpiceDB/Kessel via the RBAC relations API
data-ai
Run SQL queries against RBAC database in stage or prod using gabi
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.