Skip to content

Commit

Permalink
#1773: add tray test
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@23116 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 10, 2019
1 parent d1dd5d6 commit f20fac5
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/unittests/unit/client/mixins/tray_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
# This file is part of Xpra.
# Copyright (C) 2019 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

import unittest

from xpra.util import AdHocStruct, typedict
from xpra.client.mixins.tray import TrayClient
from unit.client.mixins.clientmixintest_util import ClientMixinTest


class AudioClientTest(ClientMixinTest):

def test_audio(self):
x = TrayClient()
def get_tray_menu_helper_class():
return None
def timeout_add(*_args):
return None
x.get_tray_menu_helper_class = get_tray_menu_helper_class
x.timeout_add = timeout_add
self.mixin = x
opts = AdHocStruct()
opts.tray = True
opts.delay_tray = 0
opts.tray_icon = ""
x.init(opts)
assert x.get_caps() is not None

def main():
unittest.main()


if __name__ == '__main__':
main()

0 comments on commit f20fac5

Please sign in to comment.