~ubuntu-branches/ubuntu/trusty/ubuntuone-control-panel/trusty-proposed

« back to all changes in this revision

Viewing changes to ubuntuone/controlpanel/gui/qt/tests/test_wizard.py

  • Committer: Package Import Robot
  • Author(s): Rodney Dawes
  • Date: 2012-12-10 09:56:24 UTC
  • mfrom: (1.1.41)
  • Revision ID: package-import@ubuntu.com-20121210095624-uqwqrftml2gg2xiq
Tags: 4.1.0-0ubuntu1
* New upstream release.
  - Replace simplejson usage with json. (LP: #1029094)
  - Clear search when clicking (X) icon in search entry. (LP: #1070917)
  - Raise existing window if process already running. (LP: #1063927)
  - Don't auto-publish when selecting a search result. (LP: #1065194)
  - Add a new .desktop file for the GNOME-only remix of Ubuntu.
* debian/control:
  - Switch pylint build dependency to pyflakes.
  - Remove python-simplejson from dependencies.
* debian/ubuntuone-control-panel-qt.install:
  - Add new .desktop file for GNOME remix.
  - Remove the messaging menu integration file.
* debian/watch:
  - Update to use stable-4-2 series for Ubuntu 13.04 releases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
 
297
297
 
298
298
class UbuntuOneWizardSettingsTestCase(UbuntuOneWizardSignInTestCase):
299
 
    """Test the CloudToComputerPage wizard page."""
 
299
    """Test the Settings wizard page."""
300
300
 
301
301
    buttons = {'BackButton': (None, 'currentIdChanged', (1,))}
302
302
    page_name = 'settings'
304
304
 
305
305
 
306
306
class UbuntuOneWizardComputerToCloudTestCase(UbuntuOneWizardSignInTestCase):
307
 
    """Test the CloudToComputerPage wizard page."""
 
307
    """Test the ComputerToCloudPage wizard page."""
308
308
 
309
309
    buttons = {
310
310
        'FinishButton': (None, 'finished', (gui.QtGui.QDialog.Accepted,)),
354
354
    method = 'login'
355
355
 
356
356
    @defer.inlineCallbacks
 
357
    def setUp(self):
 
358
        yield super(UbuntuOneWizardLoginTestCase, self).setUp()
 
359
        self.connect_files_called = False
 
360
 
 
361
        def fake_connect_files():
 
362
            self.connect_files_called = True
 
363
 
 
364
        self.patch(self.ui.backend, 'connect_files',
 
365
                   fake_connect_files)
 
366
 
 
367
    @defer.inlineCallbacks
357
368
    def test_with_credentials(self):
358
369
        """Wizard is done when credentials were retrieved."""
359
370
        self.ui.currentIdChanged.connect(self._set_called)
370
381
        button.click()
371
382
 
372
383
        yield d
373
 
 
 
384
        self.assertEqual(True, self.connect_files_called)
374
385
        self.assertTrue(self.ui.signin_page.isEnabled())
375
386
        expected_next_id = self.ui.pages[self.ui.cloud_folders_page]
376
387
        self.assertEqual(self._called, ((expected_next_id,), {}))
392
403
        button.click()
393
404
 
394
405
        yield d
395
 
 
 
406
        self.assertEqual(False, self.connect_files_called)
396
407
        self.assertTrue(self.ui.signin_page.isEnabled())
397
408
        self.assertFalse(self._called)
398
409
 
413
424
        button.click()
414
425
 
415
426
        yield d
416
 
 
 
427
        self.assertEqual(False, self.connect_files_called)
417
428
        self.assertTrue(self.ui.signin_page.isEnabled())
418
429
        self.assertFalse(self._called)  # the wizard page was not changed
419
430