~mvo/ubuntuone-installer/lp853060

« back to all changes in this revision

Viewing changes to ubuntuone/installer/tests/test_gui.py

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2011-08-08 14:30:42 UTC
  • mfrom: (8.1.2 fix-test-setup)
  • Revision ID: tarmac-20110808143042-erxkz7uhbuo846k3
Fix the inheritance for the test case to work properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
"""Tests for the GUI of the Ubuntu One Installer."""
17
17
 
18
18
from gi.repository import Gtk
 
19
from twisted.internet.defer import inlineCallbacks
19
20
from ubuntuone.devtools.testcase import DBusTestCase
20
21
from ubuntuone.installer import gui
21
22
 
23
24
class GUITestCase(DBusTestCase):
24
25
    """Main class tests."""
25
26
 
 
27
    @inlineCallbacks
26
28
    def setUp(self):
 
29
        yield super(GUITestCase, self).setUp()
27
30
        gui.Gtk.main_quit = lambda: None
28
31
        gui.Gtk.main = lambda: None
29
32
        self.dlg = gui.Window()
30
 
 
31
 
    def tearDown(self):
32
 
        self.dlg.destroy()
 
33
        self.addCleanup(self.dlg.destroy)
33
34
 
34
35
    def test_response_cancel(self):
35
36
        """Test the response callback."""