Skip to content

Commit

Permalink
tests: fix ui desktop notifications test
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Jan 2, 2025
1 parent 81567a9 commit 288c34e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/solaar/ui/desktop_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,4 @@ def alert(reason):
return None

def show(dev, reason=None):
return 1000
return None
5 changes: 4 additions & 1 deletion tests/solaar/ui/test_desktop_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ def test_show():
available = desktop_notifications.init()

result = desktop_notifications.show(dev, reason)
assert result is not None if available else result is None
if available:
assert result is not None
else:
assert result is None

0 comments on commit 288c34e

Please sign in to comment.