import pytest from app.services.tracker import estimate_tokens class TestTracker: def test_estimate_tokens_empty(self): assert estimate_tokens("") == 0 def test_estimate_tokens_short(self): tokens = estimate_tokens("Hello world") assert tokens > 0 assert tokens < 10 def test_estimate_tokens_long(self): text = "word " * 100 tokens = estimate_tokens(text) assert tokens > 50 assert tokens < 300