fix: address code review feedback on spelling
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
|
|||||||
# Pre-built categories
|
# Pre-built categories
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
#: Canonical category names recognised by the system. Users may also define
|
#: Canonical category names recognized by the system. Users may also define
|
||||||
#: their own categories via custom rules.
|
#: their own categories via custom rules.
|
||||||
BUILTIN_CATEGORIES: dict[str, str] = {
|
BUILTIN_CATEGORIES: dict[str, str] = {
|
||||||
"invoice": "Invoice",
|
"invoice": "Invoice",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class TestFilenamePatternMatching:
|
|||||||
result = classify_document(filename="Payment_Receipt.pdf")
|
result = classify_document(filename="Payment_Receipt.pdf")
|
||||||
assert result.category == "receipt"
|
assert result.category == "receipt"
|
||||||
|
|
||||||
def test_unrecognised_filename(self):
|
def test_unrecognized_filename(self):
|
||||||
"""A generic filename with no keywords should return 'unknown'."""
|
"""A generic filename with no keywords should return 'unknown'."""
|
||||||
result = classify_document(filename="document_12345.pdf")
|
result = classify_document(filename="document_12345.pdf")
|
||||||
assert result.category == "unknown"
|
assert result.category == "unknown"
|
||||||
|
|||||||
Reference in New Issue
Block a user