@@ -21,15 +21,15 @@ def test_auth_header(settings):
21
21
assert converter .auth_header == "test-key"
22
22
23
23
24
- def test_convert_markdown_empty_text ():
24
+ def test_convert_empty_text ():
25
25
"""Should raise ValidationError when text is empty."""
26
26
converter = YdocConverter ()
27
27
with pytest .raises (ValidationError , match = "Input text cannot be empty" ):
28
- converter .convert_markdown ("" )
28
+ converter .convert ("" )
29
29
30
30
31
31
@patch ("requests.post" )
32
- def test_convert_markdown_service_unavailable (mock_post ):
32
+ def test_convert_service_unavailable (mock_post ):
33
33
"""Should raise ServiceUnavailableError when service is unavailable."""
34
34
converter = YdocConverter ()
35
35
@@ -39,11 +39,11 @@ def test_convert_markdown_service_unavailable(mock_post):
39
39
ServiceUnavailableError ,
40
40
match = "Failed to connect to conversion service" ,
41
41
):
42
- converter .convert_markdown ("test text" )
42
+ converter .convert ("test text" )
43
43
44
44
45
45
@patch ("requests.post" )
46
- def test_convert_markdown_http_error (mock_post ):
46
+ def test_convert_http_error (mock_post ):
47
47
"""Should raise ServiceUnavailableError when HTTP error occurs."""
48
48
converter = YdocConverter ()
49
49
@@ -55,11 +55,11 @@ def test_convert_markdown_http_error(mock_post):
55
55
ServiceUnavailableError ,
56
56
match = "Failed to connect to conversion service" ,
57
57
):
58
- converter .convert_markdown ("test text" )
58
+ converter .convert ("test text" )
59
59
60
60
61
61
@patch ("requests.post" )
62
- def test_convert_markdown_invalid_json_response (mock_post ):
62
+ def test_convert_invalid_json_response (mock_post ):
63
63
"""Should raise InvalidResponseError when response is not valid JSON."""
64
64
converter = YdocConverter ()
65
65
@@ -71,11 +71,11 @@ def test_convert_markdown_invalid_json_response(mock_post):
71
71
InvalidResponseError ,
72
72
match = "Could not parse conversion service response" ,
73
73
):
74
- converter .convert_markdown ("test text" )
74
+ converter .convert ("test text" )
75
75
76
76
77
77
@patch ("requests.post" )
78
- def test_convert_markdown_missing_content_field (mock_post , settings ):
78
+ def test_convert_missing_content_field (mock_post , settings ):
79
79
"""Should raise MissingContentError when response is missing required field."""
80
80
81
81
settings .CONVERSION_API_CONTENT_FIELD = "expected_field"
@@ -90,11 +90,11 @@ def test_convert_markdown_missing_content_field(mock_post, settings):
90
90
MissingContentError ,
91
91
match = "Response missing required field: expected_field" ,
92
92
):
93
- converter .convert_markdown ("test text" )
93
+ converter .convert ("test text" )
94
94
95
95
96
96
@patch ("requests.post" )
97
- def test_convert_markdown_full_integration (mock_post , settings ):
97
+ def test_convert_full_integration (mock_post , settings ):
98
98
"""Test full integration with all settings."""
99
99
100
100
settings .Y_PROVIDER_API_BASE_URL = "http://test.com/"
@@ -110,7 +110,7 @@ def test_convert_markdown_full_integration(mock_post, settings):
110
110
mock_response .json .return_value = {"content" : expected_content }
111
111
mock_post .return_value = mock_response
112
112
113
- result = converter .convert_markdown ("test markdown" )
113
+ result = converter .convert ("test markdown" )
114
114
115
115
assert result == expected_content
116
116
mock_post .assert_called_once_with (
@@ -126,7 +126,7 @@ def test_convert_markdown_full_integration(mock_post, settings):
126
126
127
127
128
128
@patch ("requests.post" )
129
- def test_convert_markdown_timeout (mock_post ):
129
+ def test_convert_timeout (mock_post ):
130
130
"""Should raise ServiceUnavailableError when request times out."""
131
131
converter = YdocConverter ()
132
132
@@ -136,12 +136,12 @@ def test_convert_markdown_timeout(mock_post):
136
136
ServiceUnavailableError ,
137
137
match = "Failed to connect to conversion service" ,
138
138
):
139
- converter .convert_markdown ("test text" )
139
+ converter .convert ("test text" )
140
140
141
141
142
- def test_convert_markdown_none_input ():
142
+ def test_convert_none_input ():
143
143
"""Should raise ValidationError when input is None."""
144
144
converter = YdocConverter ()
145
145
146
146
with pytest .raises (ValidationError , match = "Input text cannot be empty" ):
147
- converter .convert_markdown (None )
147
+ converter .convert (None )
0 commit comments