extract from camera

- add help description
- use f-strings
- handle plural correctly
- rename methods, use otp_url instead of line
- remove importlib.util
- move cv2 imports to top
- remove unnecessary global delcarations
- group image tests
This commit is contained in:
scito 2022-12-28 22:28:54 +01:00
parent 7964c687f6
commit 9f0872c2d0
9 changed files with 304 additions and 193 deletions

View file

@ -65,13 +65,13 @@ class TestQRImageExtract(unittest.TestCase):
expected_output = [
'',
'WARN: line is not a otpauth-migration:// URL',
'input file: test/text_masquerading_as_image.jpeg',
'line "This is just a text file masquerading as an image file."',
'input: test/text_masquerading_as_image.jpeg',
"line 'This is just a text file masquerading as an image file.'",
'Probably a wrong file was given',
'',
'ERROR: no data query parameter in input URL',
'input file: test/text_masquerading_as_image.jpeg',
'line "This is just a text file masquerading as an image file."',
"line 'This is just a text file masquerading as an image file.'",
'Probably a wrong file was given'
]