9578053 Jan 22 2022 distfiles.gentoo.org/distfiles/gajim-1.3.3-2.tar.gz
This commit is contained in:
parent
a5b3822651
commit
4c1b226bff
1045 changed files with 753037 additions and 18 deletions
28
test/lib/notify.py
Normal file
28
test/lib/notify.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# mock notify module
|
||||
|
||||
from gajim.common import app
|
||||
from gajim.common import ged
|
||||
|
||||
notifications = []
|
||||
|
||||
class Notification:
|
||||
def _nec_notification(self, obj):
|
||||
global notifications
|
||||
notifications.append(obj)
|
||||
|
||||
def clean(self):
|
||||
global notifications
|
||||
notifications = []
|
||||
app.ged.remove_event_handler('notification', ged.GUI2,
|
||||
self._nec_notification)
|
||||
|
||||
def __init__(self):
|
||||
app.ged.register_event_handler('notification', ged.GUI2,
|
||||
self._nec_notification)
|
||||
|
||||
|
||||
def notify(event, jid, account, parameters, advanced_notif_num = None):
|
||||
notifications.append((event, jid, account, parameters, advanced_notif_num))
|
||||
|
||||
def get_advanced_notification(event, account, contact):
|
||||
return None
|
||||
Loading…
Add table
Add a link
Reference in a new issue