mirror of
https://github.com/kuhyx/signal-bot.git
synced 2026-11-10 19:27:20 +01:00
chore: drop the last references to a command this repo no longer has
Some checks are pending
CI / check (push) Waiting to run
Some checks are pending
CI / check (push) Waiting to run
The vote and rate-limit gates were salvaged from an old command that is gone; the docstring still named it, and test_store.py used its name as the arbitrary string for the vote-dedup fixture. Neither reference means anything now, and the pre-rewrite history that did contain it has been dropped, so these were the only two left in the tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d48t4qsQLBJnDwDeo2Nom
This commit is contained in:
parent
775fd0e10f
commit
180e53210b
@ -2,7 +2,7 @@
|
||||
"""Reusable gates that wrap a command handler.
|
||||
|
||||
These are the mechanisms salvaged from the unmerged vote and rate-limit
|
||||
branches, detached from the NSFW command they were originally written for.
|
||||
branches, detached from the command they were originally written for.
|
||||
They only decide whether a handler may run; recording a successful use is the
|
||||
dispatcher's job, so stacking two gates cannot double-count one invocation.
|
||||
"""
|
||||
|
||||
@ -74,10 +74,10 @@ def test_uses_today_is_per_user_and_command(store: Store) -> None:
|
||||
|
||||
|
||||
def test_votes_are_deduplicated_per_person(store: Store) -> None:
|
||||
store.add_vote(GROUP, "traps", "u1", 100.0)
|
||||
store.add_vote(GROUP, "traps", "u1", 101.0)
|
||||
store.add_vote(GROUP, "traps", "u2", 102.0)
|
||||
assert store.count_votes(GROUP, "traps", 0.0) == 2
|
||||
store.add_vote(GROUP, "kot", "u1", 100.0)
|
||||
store.add_vote(GROUP, "kot", "u1", 101.0)
|
||||
store.add_vote(GROUP, "kot", "u2", 102.0)
|
||||
assert store.count_votes(GROUP, "kot", 0.0) == 2
|
||||
|
||||
|
||||
def test_votes_outside_the_window_are_ignored(store: Store) -> None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user