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(cupsprinter, caplog, mocker):
mocker.patch("escpos.printer.CupsPrinter.printers", new={"test_printer": "Test"})
cupsprinter.printer_name = "test_printer"
assert cupsprinter.printer_name in cupsprinter.printers
with caplog.at_level(logging.INFO):
cupsprinter.open()