Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_image_to_osd(test_file):
result = image_to_osd(test_file)
assert isinstance(result, unicode if IS_PYTHON_2 else str)
for key in [
'Page number', 'Orientation in degrees', 'Rotate',
'Orientation confidence', 'Script', 'Script confidence'
]:
assert key + ':' in result