Skip to content

fix: improve General topic test suite#132

Merged
GeiserX merged 1 commit intomainfrom
fix/general-topic-follow-up
Apr 25, 2026
Merged

fix: improve General topic test suite#132
GeiserX merged 1 commit intomainfrom
fix/general-topic-follow-up

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented Apr 25, 2026

Summary

Follow-up to #122 (General topic coalesce fix by @tondeaf). Addresses all review swarm findings:

  • Rename unprofessional test data — "sexy topic msg" → "topic-47 msg [FEATURE] Date picker in conversation view #1" and similar neutral names
  • Remove redundant @pytest.mark.asyncio — project uses asyncio_mode = "auto" in pyproject.toml
  • Convert to pytest fixture_make_adapter_with_messages() + try/finally replaced with @pytest_asyncio.fixture yielding (adapter, chat_id) with automatic engine disposal
  • Add 3 edge case tests:
    • test_nonexistent_topic_returns_empty — topic_id=999 returns []
    • test_topic_zero_returns_empty — topic_id=0 must not match NULL rows via coalesce
    • test_topic_filter_combined_with_search — both filters apply simultaneously

Test plan

  • All 6 General topic tests pass (3 original + 3 new)
  • Full suite: 1563/1563 passing
  • ruff check + ruff format clean

…use fixture

- Rename unprofessional "sexy" test data to neutral names
- Remove redundant @pytest.mark.asyncio decorators (asyncio_mode=auto)
- Convert manual setup/teardown to pytest_asyncio fixture
- Add edge case tests: nonexistent topic, topic_id=0, topic+search filter
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Warning

Rate limit exceeded

@GeiserX has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 44 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 44 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bc2fd0e3-d0a0-4891-b320-f8e7d7cab024

📥 Commits

Reviewing files that changed from the base of the PR and between e0a7df2 and 79545ec.

📒 Files selected for processing (4)
  • docs/CHANGELOG.md
  • pyproject.toml
  • src/__init__.py
  • tests/test_general_topic_messages.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/general-topic-follow-up

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@GeiserX GeiserX merged commit cae9b3c into main Apr 25, 2026
6 of 7 checks passed
@GeiserX GeiserX deleted the fix/general-topic-follow-up branch April 25, 2026 17:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.46%. Comparing base (e0a7df2) to head (79545ec).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #132   +/-   ##
=======================================
  Coverage   94.46%   94.46%           
=======================================
  Files          21       21           
  Lines        5941     5941           
=======================================
  Hits         5612     5612           
  Misses        329      329           
Files with missing lines Coverage Δ
src/__init__.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant