~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/test_register.py

  • Committer: Vincent Ladeuil
  • Date: 2009-06-02 13:48:27 UTC
  • mto: (4396.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4397.
  • Revision ID: v.ladeuil+lp@free.fr-20090602134827-k1r08407pnf7rrb8
Fix plugin test too :-/

* bzrlib/plugins/launchpad/test_register.py:
(TestGatherUserCredentials.test_gather_user_credentials_prompts):prompt
is now displayed on stderr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
335
335
        g_conf = config.GlobalConfig()
336
336
        g_conf.set_user_option('email', 'Test User <test@user.com>')
337
337
        stdout = tests.StringIOWrapper()
 
338
        stderr = tests.StringIOWrapper()
338
339
        ui.ui_factory = tests.TestUIFactory(stdin='userpass\n',
339
 
                                            stdout=stdout)
 
340
                                            stdout=stdout, stderr=stderr)
340
341
        self.assertIs(None, service.registrant_password)
341
342
        service.gather_user_credentials()
342
343
        self.assertEqual('test@user.com', service.registrant_email)
343
344
        self.assertEqual('userpass', service.registrant_password)
344
 
        self.assertContainsRe(stdout.getvalue(),
 
345
        self.assertEquals('', stdout.getvalue())
 
346
        self.assertContainsRe(stderr.getvalue(),
345
347
                             'launchpad.net password for test@user\\.com')
346
348