quick commit
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 6m9s
CI/CD Pipeline / Security Scanning (push) Successful in 26s
CI/CD Pipeline / Tests (3.11) (push) Failing after 5m24s
CI/CD Pipeline / Tests (3.12) (push) Failing after 5m23s
CI/CD Pipeline / Build Docker Image (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
CI/CD Pipeline / Notification (push) Successful in 1s
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 6m9s
CI/CD Pipeline / Security Scanning (push) Successful in 26s
CI/CD Pipeline / Tests (3.11) (push) Failing after 5m24s
CI/CD Pipeline / Tests (3.12) (push) Failing after 5m23s
CI/CD Pipeline / Build Docker Image (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
CI/CD Pipeline / Notification (push) Successful in 1s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from guardden.services.ai.base import ContentCategory, ModerationResult
|
||||
from guardden.services.ai.base import ContentCategory, ModerationResult, parse_categories
|
||||
from guardden.services.ai.factory import NullProvider, create_ai_provider
|
||||
|
||||
|
||||
@@ -69,6 +69,14 @@ class TestModerationResult:
|
||||
assert result.severity == 100
|
||||
|
||||
|
||||
class TestParseCategories:
|
||||
"""Tests for category parsing helper."""
|
||||
|
||||
def test_parse_categories_filters_invalid(self) -> None:
|
||||
categories = parse_categories(["harassment", "unknown", "scam"])
|
||||
assert categories == [ContentCategory.HARASSMENT, ContentCategory.SCAM]
|
||||
|
||||
|
||||
class TestNullProvider:
|
||||
"""Tests for NullProvider."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user