Replaced fallback database seeding with an informational message for empty channels.
Audit / Dependencies (push) Successful in 6s
CD / Publish (push) Successful in 5s
CI / Formatting (push) Successful in 4s
CI / Linting (push) Successful in 5s
CI / Tests (push) Successful in 16s
CI / Type Checking (push) Successful in 11s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-18 20:01:12 -04:00
parent a8d3a5c421
commit a7b4337835
2 changed files with 15 additions and 6 deletions
+11 -3
View File
@@ -170,9 +170,13 @@ class TestGenerate:
"""Markov chain text generation."""
async def test_fallback_on_empty_channel(self, db: Database) -> None:
"""Returns 'Hello world!' when the channel has no data."""
"""Returns an informational message when the channel has no data."""
result = await generate(db, 1)
assert result == "Hello world!"
expected = (
"There's not enough data to generate a message yet."
" Chat a bit more so I can learn how this channel talks!"
)
assert result == expected
async def test_generates_from_ingested_data(self, db: Database) -> None:
"""Generated text uses words from ingested data."""
@@ -278,4 +282,8 @@ class TestGenerate:
# Channel 3 has no data; should get the fallback.
result = await generate(db, 3)
assert result == "Hello world!"
expected = (
"There's not enough data to generate a message yet."
" Chat a bit more so I can learn how this channel talks!"
)
assert result == expected