/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_ui.py

  • Committer: Curtis Hovey
  • Date: 2012-02-27 16:25:14 UTC
  • mto: (776.2.1 ui-factory)
  • mto: This revision was merged to the branch mainline in revision 779.
  • Revision ID: sinzui.is@verizon.net-20120227162514-zwbtdwwfbc2o6sox
Added test for progress container tick().

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
        self.assertIs(True, progress_bar.finished.called)
231
231
 
232
232
 
233
 
class ProgressBarWindowTestCase(tests.TestCase):
 
233
class ProgressContainerMixin:
 
234
 
 
235
    def test_tick(self):
 
236
        progress_widget = self.progress_container()
 
237
        MockMethod.bind(self, progress_widget, 'show_all')
 
238
        MockMethod.bind(self, progress_widget.pb, 'tick')
 
239
        progress_widget.tick()
 
240
        self.assertIs(True, progress_widget.show_all.called)
 
241
        self.assertIs(True, progress_widget.pb.tick.called)
 
242
 
 
243
 
 
244
class ProgressBarWindowTestCase(ProgressContainerMixin, tests.TestCase):
 
245
 
 
246
    progress_container = ui.ProgressBarWindow
234
247
 
235
248
    def test_init(self):
236
249
        pb_window = ui.ProgressBarWindow()