def test_get_password_from_prompt(self): user_action = UserAction() passwd = 'secret!' with mock.patch('fuelclient.cli.actions.user.getpass', return_value=passwd): user_passwd = user_action._get_password_from_prompt() self.assertEqual(passwd, user_passwd)
def test_get_password_from_prompt(self): user_action = UserAction() passwd = 'secret!' with mock.patch('fuelclient.cli.actions.user.getpass', return_value=passwd): user_passwd = user_action._get_password_from_prompt() self.assertEqual(passwd, user_passwd)
def test_get_password_from_prompt_different_passwords(self, mgetpass): user_action = UserAction() with self.assertRaisesRegexp( ArgumentException, 'Passwords are not the same'): user_action._get_password_from_prompt()
def test_get_password_from_prompt_different_passwords(self, mgetpass): user_action = UserAction() with self.assertRaisesRegexp(ArgumentException, 'Passwords are not the same'): user_action._get_password_from_prompt()