~jmarsden/ubiquity/lp775124

« back to all changes in this revision

Viewing changes to tests/test_gtkui.py

  • Committer: Colin Watson
  • Date: 2011-08-29 16:21:50 UTC
  • Revision ID: cjwatson@canonical.com-20110829162150-6ujzrow0z25mrtji
Mock ubiquity.nm.wireless_hardware_present in GTK frontend tests, as it
may not be able to talk to D-Bus.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    @mock.patch('ubiquity.misc.execute')
16
16
    @mock.patch('ubiquity.frontend.base.drop_privileges')
17
17
    @mock.patch('ubiquity.frontend.gtk_ui.Wizard.customize_installer')
18
 
    def test_question_dialog(self, *args):
 
18
    @mock.patch('ubiquity.nm.wireless_hardware_present')
 
19
    def test_question_dialog(self, mock_wireless_hardware_present, *args):
 
20
        mock_wireless_hardware_present.return_value = False
19
21
        ui = gtk_ui.Wizard('test-ubiquity')
20
22
        with mock.patch('gi.repository.Gtk.Dialog.run') as run:
21
23
            run.return_value = 0