fix: cleanup codebase and sync SPEC with actual permissions
Phase 1: Ruff lint fixes - Remove unused imports across all files - Remove unused variables (now_utc, tz, ctx) - Fix f-string without placeholders - Fix E402 import order with noqa comments Phase 2: Remove confusing hard delete from storage - Removed delete_bounty() from RoomStorage Protocol (never used by app) - Removed delete_bounty() from JsonFileRoomStorage (was hard delete) - Removed corresponding tests (hard delete was never used) Phase 3: Sync SPEC.md with actual code behavior - Updated overview: admins can add/edit/delete (not 'anyone' + 'creator') - Updated command table: /add, /edit, /delete are admin only - Updated error handling messages Test results: 96 passed (2 hard delete tests removed)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from io import StringIO
|
||||
import sys
|
||||
|
||||
from core.models import Bounty
|
||||
from core.ports import RoomStorage, TrackingStorage
|
||||
@@ -237,7 +236,7 @@ class TestCLIValidation:
|
||||
main()
|
||||
mock_bounty_service.update_bounty.assert_called_once()
|
||||
call_kwargs = mock_bounty_service.update_bounty.call_args
|
||||
assert call_kwargs.kwargs.get("clear_link") == True
|
||||
assert call_kwargs.kwargs.get("clear_link") is True
|
||||
|
||||
def test_update_clear_due_flag(self):
|
||||
"""Test update with --clear-due flag."""
|
||||
@@ -255,7 +254,7 @@ class TestCLIValidation:
|
||||
main()
|
||||
mock_bounty_service.update_bounty.assert_called_once()
|
||||
call_kwargs = mock_bounty_service.update_bounty.call_args
|
||||
assert call_kwargs.kwargs.get("clear_due") == True
|
||||
assert call_kwargs.kwargs.get("clear_due") is True
|
||||
|
||||
|
||||
class TestCLIOutput:
|
||||
|
||||
Reference in New Issue
Block a user