Skip to content

Commit f6d1f26

Browse files
hermanntoastclaude
andcommitted
Chore: add test for failing allowed users update of printers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9c25749 commit f6d1f26

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎usr/lib/python3/dist-packages/linuxmusterLinuxclient7/tests/test_printers.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ def test_uninstallAllPrintersOfUserKeepsPrinterForOtherUsers(mockSubprocessRun,
154154
assert printers.uninstallAllPrintersOfUser("user1")
155155
assert _getCallsTo(mockSubprocessCall, "timeout") == [["timeout", "10", "/usr/sbin/lpadmin", "-p", "printer1", "-u", "allow:user2"]]
156156

157+
mockSubprocessCall.return_value = 1
158+
mockSubprocessRun.side_effect = [lpstatPrinters, lpstatAllowedUsers]
159+
assert not printers.uninstallAllPrintersOfUser("user1")
160+
157161
# --------------------
158162
# - Helper functions -
159163
# --------------------

0 commit comments

Comments
 (0)