test: stabilize Phase 0 API and workflow tests [FASE-0.4]
Assert INVALID_TRANSITION JSON code on duplicate start, remove sys.modules stubs from T-106 tests, and complete boto3 stubs in integration tests.
This commit is contained in:
@@ -115,7 +115,12 @@ for _mod in [
|
||||
"passlib", "passlib.context",
|
||||
]:
|
||||
if _mod not in sys.modules:
|
||||
sys.modules[_mod] = ModuleType(_mod)
|
||||
m = ModuleType(_mod)
|
||||
if _mod == "boto3":
|
||||
m.client = MagicMock()
|
||||
elif _mod == "botocore.exceptions":
|
||||
m.ClientError = Exception
|
||||
sys.modules[_mod] = m
|
||||
|
||||
# Now safe to import
|
||||
from app.models.enums import TestState, TestResult, TechniqueStatus
|
||||
|
||||
Reference in New Issue
Block a user