chore: initialize containerized Python learning workbook (2026 DevOps/SRE)
This commit is contained in:
commit
ae4c421815
63 files changed
+1273
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# 04 — Dobre Praktyki Testowania (`pytest`, In-Memory Fakes)
|
||||
|
||||
Zamiast kruchych mocków (`MagicMock`), w testach jednostkowych stosuj czyste **In-Memory Fakes** implementujące ten sam kontrakt (`Protocol`).
|
||||
|
||||
## Zadania (`testing_ex.py`)
|
||||
1. Zaimplementuj `InMemoryKvStore` spełniający `KvStore`.
|
||||
2. Zaimplementuj `FeatureFlagService.is_enabled(flag: str) -> bool` (zwraca `True`, jeśli wartość w store to `"true"` lub `"1"`, case-insensitive).
|
||||
|
||||
## Uruchomienie testów
|
||||
```bash
|
||||
make test MOD=02-engineering-2026/04-testing-best-practices
|
||||
```
|
||||
Reference in new issue
Block a user