Пример #1
0
 def test_get_lp_login_updates_authentication_conf(self):
     account._set_global_option('foo')
     self.assertIs(None, account._get_auth_user())
     account.get_lp_login()
     auth = config.AuthenticationConfig()
     self.assertEqual('foo', account._get_auth_user(auth))
     self.assertEqual('foo', auth.get_user('ssh', 'bazaar.launchpad.net'))
     self.assertEqual('foo',
                      auth.get_user('ssh', 'bazaar.staging.launchpad.net'))
Пример #2
0
 def test_get_lp_login_updates_authentication_conf(self):
     account._set_global_option('foo')
     self.assertIs(None, account._get_auth_user())
     account.get_lp_login()
     auth = config.AuthenticationConfig()
     self.assertEqual('foo', account._get_auth_user(auth))
     self.assertEqual('foo', auth.get_user('ssh', 'bazaar.launchpad.net'))
     self.assertEqual('foo', auth.get_user('ssh',
                                           'bazaar.staging.launchpad.net'))
Пример #3
0
 def test_get_lp_login_does_not_update_for_none_user(self):
     account.get_lp_login()
     self.assertIs(None, account._get_auth_user())
Пример #4
0
 def test_set_lp_login_updates_authentication_conf(self):
     self.assertIs(None, account._get_auth_user())
     account.set_lp_login('foo')
     self.assertEqual('foo', account._get_auth_user())
Пример #5
0
 def test_get_lp_login_does_not_update_for_none_user(self):
     account.get_lp_login()
     self.assertIs(None, account._get_auth_user())
Пример #6
0
 def test_set_lp_login_updates_authentication_conf(self):
     self.assertIs(None, account._get_auth_user())
     account.set_lp_login('foo')
     self.assertEqual('foo', account._get_auth_user())