♻️(backend) stylistic and consistency changes
Refactored converter services based on PR #1609 review comments: - Renamed parameter to `data` across all convert methods for consistency - Replaced recursive call with explicit sequential calls for readability - Hardcoded CONVERSION_API_SECURE=True in Production class for security - Removed unused YdocConverter import from viewsets.py - Updated tests to match new error message wording Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
This commit is contained in:
committed by
Anthony LC
parent
767710231d
commit
f0cc29e779
@@ -22,9 +22,9 @@ def test_auth_header(settings):
|
||||
|
||||
|
||||
def test_convert_empty_text():
|
||||
"""Should raise ValidationError when text is empty."""
|
||||
"""Should raise ValidationError when data is empty."""
|
||||
converter = YdocConverter()
|
||||
with pytest.raises(ValidationError, match="Input text cannot be empty"):
|
||||
with pytest.raises(ValidationError, match="Input data cannot be empty"):
|
||||
converter.convert("")
|
||||
|
||||
|
||||
@@ -143,5 +143,5 @@ def test_convert_none_input():
|
||||
"""Should raise ValidationError when input is None."""
|
||||
converter = YdocConverter()
|
||||
|
||||
with pytest.raises(ValidationError, match="Input text cannot be empty"):
|
||||
with pytest.raises(ValidationError, match="Input data cannot be empty"):
|
||||
converter.convert(None)
|
||||
|
||||
Reference in New Issue
Block a user