1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-12-02 09:43:30 +00:00

Test the 'printers' property

This commit is contained in:
belono
2023-10-22 19:06:41 +02:00
parent 5019b88430
commit 3fb5ce27a1
3 changed files with 12 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ def test_open(lpprinter, caplog, mocker):
mocker.patch("escpos.printer.LP.printers", new={"test_printer": "Test"})
lpprinter.printer_name = "test_printer"
assert lpprinter.printer_name in lpprinter.printers
with caplog.at_level(logging.INFO):
lpprinter.open()