Commit f1f4d20
committed
fix: patch redis_client in test classes to match new Redis guards
The redis_client None guards added in the previous commit caused 9
test failures because redis_client is None in the test environment.
Fix: added @patch('routes.playground.indexing.redis_client', MagicMock())
to TestIndexEndpoint, TestSessionConflict, and TestStatusEndpoint.
TestStatusEndpoint uses MagicMock(get=MagicMock(return_value=None))
so test_job_not_found_returns_404 exercises the real AnonymousIndexingJob
code path (redis.get returns None -> job not found -> 404).
289 tests pass locally. Verified before committing.1 parent c36e272 commit f1f4d20
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| |||
420 | 421 | | |
421 | 422 | | |
422 | 423 | | |
| 424 | + | |
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
| |||
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
| 509 | + | |
507 | 510 | | |
508 | 511 | | |
509 | 512 | | |
| |||
0 commit comments