summaryrefslogtreecommitdiff
path: root/tests/end2end
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-26 17:29:38 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-27 15:30:57 +0100
commita0f7c36a54532f31c5cba39dd9e25dedc23685bb (patch)
tree1d34339dfad50fe303eef8c3ed023caf7f19b659 /tests/end2end
parent1dcd0d54831cf2eccd030de50509bbaa5a63954b (diff)
downloadqutebrowser-a0f7c36a54532f31c5cba39dd9e25dedc23685bb.tar.gz
qutebrowser-a0f7c36a54532f31c5cba39dd9e25dedc23685bb.zip
notifications: Use _as_uint32 everywhere
Diffstat (limited to 'tests/end2end')
-rw-r--r--tests/end2end/fixtures/notificationserver.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/end2end/fixtures/notificationserver.py b/tests/end2end/fixtures/notificationserver.py
index ded74e28f..f956ed948 100644
--- a/tests/end2end/fixtures/notificationserver.py
+++ b/tests/end2end/fixtures/notificationserver.py
@@ -42,10 +42,6 @@ class NotificationProperties:
closed_via_web: bool = False
-def _as_uint32(x: int) -> QVariant:
- variant = QVariant(x)
- assert variant.convert(QVariant.UInt)
- return variant
class TestNotificationServer(QObject):
@@ -156,7 +152,10 @@ class TestNotificationServer(QObject):
# The 2 here is the notification removal reason ("dismissed by the user")
# it's effectively arbitrary as we don't use that information
- message.setArguments([_as_uint32(notification_id), _as_uint32(2)])
+ message.setArguments([
+ notification._as_uint32(notification_id),
+ notification._as_uint32(2),
+ ])
if not self._bus.send(message):
raise OSError("Could not send close notification")
@@ -171,7 +170,7 @@ class TestNotificationServer(QObject):
notification.DBusNotificationAdapter.INTERFACE,
"ActionInvoked")
- message.setArguments([_as_uint32(notification_id), name])
+ message.setArguments([notification._as_uint32(notification_id), name])
if not self._bus.send(message):
raise OSError("Could not send action notification")