diff --git a/signal_bot/decorators.py b/signal_bot/decorators.py index 861cbeb..e99fd10 100644 --- a/signal_bot/decorators.py +++ b/signal_bot/decorators.py @@ -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. """ diff --git a/tests/test_store.py b/tests/test_store.py index 0107864..11d1b1f 100644 --- a/tests/test_store.py +++ b/tests/test_store.py @@ -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: