~tealeg/landscape-client/switching-text-on-button

« back to all changes in this revision

Viewing changes to landscape/ui/view/tests/test_configuration.py

  • Committer: Geoff Teale
  • Date: 2012-03-14 17:03:14 UTC
  • Revision ID: geoffrey.teale@canonical.com-20120314170314-nb3l0gml2ixqv1vl
Switch button text based on action to be carried out.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        local_service_frame = dialog.liststore.get(iter, 2)[0]
79
79
 
80
80
        self.assertEqual(1, dialog.use_type_combobox.get_active())
 
81
        [alignment] = dialog.register_button.get_children()
 
82
        [hbox] = alignment.get_children()
 
83
        [image, label] = hbox.get_children()
81
84
 
82
85
        while Gtk.events_pending():
83
86
            Gtk.main_iteration()
84
87
        self.assertIs(hosted_service_frame, dialog.active_widget)
 
88
        self.assertEqual(dialog.REGISTER_BUTTON_TEXT, label.get_text())
85
89
 
86
90
        dialog.use_type_combobox.set_active(0)
87
91
        while Gtk.events_pending():
88
92
            Gtk.main_iteration()
89
93
        self.assertIs(no_service_frame, dialog.active_widget)
 
94
        self.assertEqual(dialog.DISABLE_BUTTON_TEXT, label.get_text())
90
95
 
91
96
        dialog.use_type_combobox.set_active(2)
92
97
        while Gtk.events_pending():
93
98
            Gtk.main_iteration()
94
99
        self.assertIs(local_service_frame, dialog.active_widget)
 
100
        self.assertEqual(dialog.REGISTER_BUTTON_TEXT, label.get_text())
95
101
 
96
102
    def test_modify(self):
97
103
        """