Test OpenAPI export when file writing fails.
(self, mock_file, mock_app)
| 33 | @patch("memos.cli.get_openapi_app") |
| 34 | @patch("builtins.open", side_effect=OSError("Permission denied")) |
| 35 | def test_export_openapi_error(self, mock_file, mock_app): |
| 36 | """Test OpenAPI export when file writing fails.""" |
| 37 | mock_app.return_value.openapi.return_value = {"test": "data"} |
| 38 | |
| 39 | with pytest.raises(IOError): |
| 40 | export_openapi("/invalid/path/openapi.json") |
| 41 | |
| 42 | |
| 43 | class TestDownloadExamples: |
nothing calls this directly
no test coverage detected