mirror of
https://github.com/python-escpos/python-escpos
synced 2025-07-15 08:43:30 +00:00
Extend cups tests
This commit is contained in:
parent
97912daf8c
commit
34cd71df2d
@ -154,3 +154,23 @@ def test_raw(cupsprinter):
|
|||||||
cupsprinter._raw(b"Test")
|
cupsprinter._raw(b"Test")
|
||||||
cupsprinter.tmpfile.seek(0)
|
cupsprinter.tmpfile.seek(0)
|
||||||
assert cupsprinter.tmpfile.read() == b"Test"
|
assert cupsprinter.tmpfile.read() == b"Test"
|
||||||
|
|
||||||
|
|
||||||
|
def test_printers_no_device(cupsprinter):
|
||||||
|
"""
|
||||||
|
GIVEN a cups printer object
|
||||||
|
WHEN device is None
|
||||||
|
THEN check the return value is {}
|
||||||
|
"""
|
||||||
|
cupsprinter.device = None
|
||||||
|
assert cupsprinter.printers == {}
|
||||||
|
|
||||||
|
|
||||||
|
def test_read_no_device(cupsprinter):
|
||||||
|
"""
|
||||||
|
GIVEN a cups printer object
|
||||||
|
WHEN device is None
|
||||||
|
THEN check the return value is []
|
||||||
|
"""
|
||||||
|
cupsprinter.device = None
|
||||||
|
assert cupsprinter._read() == []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user