[GTK3] Fix ui_entry tests for gtk3

This commit is contained in:
Calum Lind 2018-09-20 11:13:47 +01:00 committed by Calum Lind
parent 8285b226eb
commit 6fbb1bb370
1 changed files with 4 additions and 4 deletions

View File

@ -165,10 +165,10 @@ class DelugeEntryTestCase(BaseTestCase):
class GtkUIBaseTestCase(UIBaseTestCase): class GtkUIBaseTestCase(UIBaseTestCase):
"""Implement all GtkUI tests here""" """Implement all GtkUI tests here"""
def test_start_gtkui(self): def test_start_gtk3ui(self):
self.patch(sys, 'argv', utf8_encode_structure(self.var['sys_arg_cmd'])) self.patch(sys, 'argv', utf8_encode_structure(self.var['sys_arg_cmd']))
from deluge.ui.gtkui import gtkui from deluge.ui.gtk3 import gtkui
with mock.patch.object(gtkui.GtkUI, 'start', autospec=True): with mock.patch.object(gtkui.GtkUI, 'start', autospec=True):
self.exec_command() self.exec_command()
@ -196,10 +196,10 @@ class GtkUIScriptEntryTestCase(BaseTestCase, GtkUIBaseTestCase):
def __init__(self, testname): def __init__(self, testname):
super(GtkUIScriptEntryTestCase, self).__init__(testname) super(GtkUIScriptEntryTestCase, self).__init__(testname)
GtkUIBaseTestCase.__init__(self) GtkUIBaseTestCase.__init__(self)
from deluge.ui import gtkui from deluge.ui import gtk3
self.var['cmd_name'] = 'deluge-gtk' self.var['cmd_name'] = 'deluge-gtk'
self.var['start_cmd'] = gtkui.start self.var['start_cmd'] = gtk3.start
self.var['sys_arg_cmd'] = ['./deluge-gtk'] self.var['sys_arg_cmd'] = ['./deluge-gtk']
def set_up(self): def set_up(self):