mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
7535f92ac8
This puts Vorta on PyQt6 and starts a new main branch 0.9. --------- Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com> Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com> Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
18 lines
713 B
Python
18 lines
713 B
Python
import sys
|
|
import pytest
|
|
from PyQt6 import QtDBus
|
|
import vorta.borg
|
|
import vorta.notifications
|
|
|
|
|
|
@pytest.mark.skipif(sys.platform != 'linux', reason="DBus notifications only on Linux")
|
|
def test_linux_background_notifications(qapp, mocker):
|
|
"""We can't see notifications, but we watch for exceptions and errors."""
|
|
|
|
notifier = vorta.notifications.VortaNotifications.pick()
|
|
assert isinstance(notifier, vorta.notifications.DBusNotifications)
|
|
notifier.deliver('Vorta Test', 'test notification', level='error')
|
|
|
|
mocker.spy(QtDBus.QDBusInterface, 'call')
|
|
notifier.deliver('Vorta Test', 'test notification', level='info') # fails if called.
|
|
assert QtDBus.QDBusInterface.call.call_count == 0
|