~nataliabidart/ubuntuone-control-panel/smaller-loading

« back to all changes in this revision

Viewing changes to ubuntuone/controlpanel/gui/qt/main/tests/test_main.py

  • Committer: Tarmac
  • Author(s): Roberto Alsina
  • Date: 2012-03-22 13:23:26 UTC
  • mfrom: (290.1.18 installer-option)
  • Revision ID: tarmac-20120322132326-q2iygz9sftf79c18
- Made the license page from the wizard be shown (only when called with --installer) (LP: #933697).

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        """Ensure the binary name is not given to argparse."""
133
133
        main.main(["foo", "bar", sys.argv[0], "--minimized"])
134
134
        self.assertEqual(self.start.args[1],
135
 
            {'minimized': True, 'with_icon': False})
 
135
            {'minimized': True, 'with_icon': False, 'installer': False})
136
136
 
137
137
    def test_minimized_option(self):
138
138
        """Ensure the --minimized option is parsed and passed correctly."""
139
139
        main.main([sys.argv[0], "--minimized"])
140
140
        self.assertEqual(self.start.args[1],
141
 
            {'minimized': True, 'with_icon': False})
 
141
            {'minimized': True, 'with_icon': False, 'installer': False})
142
142
 
143
143
    def test_with_icon_option(self):
144
144
        """Ensure the --minimized option is parsed and passed correctly."""
145
145
        main.main([sys.argv[0], "--with-icon"])
146
146
        self.assertEqual(self.start.args[1],
147
 
            {'minimized': False, 'with_icon': True})
 
147
            {'minimized': False, 'with_icon': True, 'installer': False})
148
148
 
149
149
    def test_all_styles_load(self):
150
150
        """Ensure the platform style is loaded."""
160
160
        main.main([sys.argv[0], "--switch-to", "folders"])
161
161
        self.assertEqual(self.start.window.tabname, "folders")
162
162
 
 
163
    def test_installer_option(self):
 
164
        """Ensure the --installer option is parsed and passed correctly."""
 
165
        main.main([sys.argv[0], "--installer"])
 
166
        self.assertEqual(self.start.args[1],
 
167
            {'minimized': False, 'with_icon': False, 'installer': True})
 
168
 
163
169
    def test_translator(self):
164
170
        """Ensure the Qt translator is loaded."""
165
171
        main.main([sys.argv[0]])