/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_push.py

  • Committer: Curtis Hovey
  • Date: 2012-03-03 22:06:53 UTC
  • mto: This revision was merged to the branch mainline in revision 782.
  • Revision ID: sinzui.is@verizon.net-20120303220653-ci28pi8cevecyzr9
Added tests for push __init__.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from bzrlib import (
22
22
    tests,
 
23
    ui,
23
24
    )
24
25
 
25
26
from bzrlib.plugins.gtk import set_ui_factory
28
29
    MockMethod,
29
30
    MockProperty,
30
31
    )
 
32
from bzrlib.plugins.gtk.ui import ProgressPanel
31
33
 
32
34
 
33
35
class PushTestCase(tests.TestCaseWithMemoryTransport):
43
45
        self.assertIs(None, dialog.revid)
44
46
        self.assertIs(branch, dialog.branch)
45
47
        self.assertIsInstance(dialog._label_location, Gtk.Label)
 
48
        self.assertEqual((0.0, 0.5), dialog._label_location.get_alignment())
46
49
        self.assertIsInstance(dialog._combo, Gtk.ComboBox)
47
50
        self.assertIsInstance(dialog._button_push, Gtk.Button)
48
51
        self.assertIsInstance(dialog._hbox_location, Gtk.Box)
50
53
            Gtk.Orientation.HORIZONTAL,
51
54
            dialog._hbox_location.props.orientation)
52
55
        self.assertEqual(3, dialog._hbox_location.props.spacing)
 
56
        self.assertEqual(3, dialog.get_content_area().props.spacing)
 
57
        self.assertIsInstance(dialog._progress_widget, ProgressPanel)
 
58
        self.assertIs(
 
59
            ui.ui_factory._progress_bar_widget, dialog._progress_widget)
 
60
        self.assertIsInstance(dialog._push_message, Gtk.Label)
 
61
        self.assertIs(True, dialog._combo.props.visible)
 
62
        self.assertIs(False, dialog._progress_widget.props.visible)
 
63
        self.assertIs(False, dialog._push_message.props.visible)