def test_get_password_verify_failure(self):
     env = {"OS_VERIFY_PASSWORD": "******"}
     self.useFixture(fixtures.MonkeyPatch("os.environ", env))
     self.useFixture(
         fixtures.MonkeyPatch("getpass.getpass", lambda prompt: prompt))
     self.assertIsNone(cliutils.get_password())
 def test_get_password_verify(self):
     env = {"OS_VERIFY_PASSWORD": "******"}
     self.useFixture(fixtures.MonkeyPatch("os.environ", env))
     self.useFixture(
         fixtures.MonkeyPatch("getpass.getpass", lambda prompt: "mellon"))
     self.assertEqual("mellon", cliutils.get_password())
 def test_get_password(self):
     self.useFixture(
         fixtures.MonkeyPatch("getpass.getpass", lambda prompt: "mellon"))
     self.assertEqual("mellon", cliutils.get_password())
 def test_get_password_verify_failure(self):
     env = {"OS_VERIFY_PASSWORD": "******"}
     self.useFixture(fixtures.MonkeyPatch("os.environ", env))
     self.useFixture(fixtures.MonkeyPatch("getpass.getpass",
                                          lambda prompt: prompt))
     self.assertIsNone(cliutils.get_password())
 def test_get_password_verify(self):
     env = {"OS_VERIFY_PASSWORD": "******"}
     self.useFixture(fixtures.MonkeyPatch("os.environ", env))
     self.useFixture(fixtures.MonkeyPatch("getpass.getpass",
                                          lambda prompt: "mellon"))
     self.assertEqual("mellon", cliutils.get_password())
 def test_get_password(self):
     self.useFixture(fixtures.MonkeyPatch("getpass.getpass",
                                          lambda prompt: "mellon"))
     self.assertEqual("mellon", cliutils.get_password())