Commit 1e064ea
fix: address test review — eliminate mock theater, add edge cases
Critical fixes (tests that could pass with broken production code):
- Discord cache eviction test: was replicating eviction logic inline.
Now calls _handle_forwarded_reaction which triggers the real code path.
- GitHub cache purge test: was replicating purge logic inline.
Now calls _get_installation_token which runs the real purge.
Missing edge cases added to test_chat_resolver.py:
- from_json errors when no singleton and no chat= (lazy RuntimeError)
- from_json with mismatched adapter name (adapter resolves to None)
- activate() context manager resets ContextVar after exception
Other improvements:
- test_concurrent_tasks_isolated: use public API (get_adapter) instead
of private _user_name attribute
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e81d337 commit 1e064ea
2 files changed
Lines changed: 79 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
87 | 121 | | |
88 | 122 | | |
89 | 123 | | |
| |||
181 | 215 | | |
182 | 216 | | |
183 | 217 | | |
184 | | - | |
| 218 | + | |
185 | 219 | | |
186 | | - | |
| 220 | + | |
187 | 221 | | |
188 | | - | |
189 | 222 | | |
190 | 223 | | |
191 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
192 | 227 | | |
193 | 228 | | |
194 | | - | |
195 | | - | |
| 229 | + | |
| 230 | + | |
196 | 231 | | |
197 | 232 | | |
198 | | - | |
199 | | - | |
| 233 | + | |
| 234 | + | |
200 | 235 | | |
201 | 236 | | |
202 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
520 | 525 | | |
521 | 526 | | |
522 | 527 | | |
| |||
526 | 531 | | |
527 | 532 | | |
528 | 533 | | |
| 534 | + | |
| 535 | + | |
529 | 536 | | |
530 | | - | |
| 537 | + | |
531 | 538 | | |
532 | 539 | | |
533 | 540 | | |
534 | 541 | | |
535 | 542 | | |
536 | 543 | | |
537 | | - | |
538 | 544 | | |
539 | 545 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
547 | 559 | | |
548 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
549 | 564 | | |
550 | 565 | | |
551 | 566 | | |
| |||
583 | 598 | | |
584 | 599 | | |
585 | 600 | | |
586 | | - | |
| 601 | + | |
| 602 | + | |
587 | 603 | | |
588 | 604 | | |
589 | 605 | | |
590 | 606 | | |
591 | | - | |
| 607 | + | |
592 | 608 | | |
593 | 609 | | |
594 | 610 | | |
595 | 611 | | |
596 | | - | |
| 612 | + | |
597 | 613 | | |
598 | 614 | | |
599 | 615 | | |
600 | 616 | | |
601 | 617 | | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
608 | 621 | | |
| 622 | + | |
609 | 623 | | |
610 | 624 | | |
0 commit comments