18 lines
435 B
Python
18 lines
435 B
Python
import pytest
|
|
|
|
|
|
@pytest.mark.unit
|
|
def test_ocr_grid_saves_schema_keys():
|
|
from cthulhu.plugins.OCR import plugin
|
|
|
|
grid = plugin.OCRPreferencesGrid()
|
|
grid.set_language_code("eng")
|
|
grid.set_scale_factor(4)
|
|
grid.set_copy_to_clipboard(True)
|
|
|
|
result = grid.save_settings("default", "")
|
|
|
|
assert result["language-code"] == "eng"
|
|
assert result["scale-factor"] == 4
|
|
assert result["copy-to-clipboard"] is True
|