fdt-refactor-mock-to-fake
Refactoring Mocks to Fakes
Remove unittest.mock.patch from tests by making source code inject gateway
dependencies, then configuring pre-canned fakes in tests.
Use this skill when: A test imports from unittest.mock import patch or uses
@patch(...) decorators.
Key principle: Don't stop at the lowest-level matching gateway. Look for a higher-level abstraction that covers ALL the things being mocked together.
Phase 1: Audit Mock Usage
Read the test file. For each patch(...) call, record:
| Mock target (fully qualified) | System boundary (tool) | What it simulates | Return value configured |
|---|
More from dagster-io/erk
dignified-code-simplifier
Simplifies and refines Python code for clarity, consistency, and maintainability while preserving all functionality. Applies dignified-python standards. Focuses on recently modified code unless instructed otherwise.
96dignified-python
Production Python coding standards with automatic version detection (3.10-3.13). Use when writing,
77cli-skill-creator
This skill should be used when creating a skill for a CLI tool. Use when users ask to document a command-line tool, create CLI guidance, or build a skill for terminal commands. Essential for systematically introspecting CLI tools through help text, man pages, GitHub repos, and online research, then organizing findings into effective skill documentation.
72command-creator
This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash command", "add a command", or want to document a workflow as a reusable command. Essential for creating optimized, agent-executable slash commands with proper structure and best practices.
72learned-docs
This skill should be used when writing, modifying, or reorganizing
71session-inspector
>
71