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(cliutils.get_password(), "mellon")
     self.useFixture(fixtures.MonkeyPatch("getpass.getpass",
                                          lambda prompt: prompt))
     self.assertIsNone(cliutils.get_password())
 def test_get_password(self):
     self.useFixture(fixtures.MonkeyPatch("getpass.getpass",
                                          lambda prompt: "mellon"))
     self.assertEqual(cliutils.get_password(), "mellon")