import sqlite3 from .counter_bot import CounterBot TEST_DB_NAME = "test.db" counter_bot = CounterBot(TEST_DB_NAME) counter_bot.clear_rows() def test_get_present_count() -> None: counter_bot.update_presence("Alice", True) counter_bot.update_presence("Bob", True) counter_bot.update_presence("Bob", False) counter_bot.update_presence("Bob", True) assert counter_bot.get_present_count() == 2 def test_present_names() -> None: assert counter_bot.get_present_names() == ["Alice", "Bob"]