Esempio n. 1
0
 def test_user_canceled(self):
     # If the user cancels either the "enter your password to unlock the
     # keyring" dialog or clicks "deny" on the "can this application access
     # the wallet" dialog then openWallet() will return None.  The
     # open_wallet() function should handle that eventuality by returning
     # None to signify that the KWallet backend is not available.
     self.assertEqual(kwallet.open_kwallet(UnOpenableKWallet(), FauxQtGui()), None)
Esempio n. 2
0
 def test_user_canceled(self):
     # If the user cancels either the "enter your password to unlock the
     # keyring" dialog or clicks "deny" on the "can this application access
     # the wallet" dialog then openWallet() will return None.  The
     # open_wallet() function should handle that eventuality by returning
     # None to signify that the KWallet backend is not available.
     self.assertEqual(
         kwallet.open_kwallet(UnOpenableKWallet(), FauxQtGui()), None)
Esempio n. 3
0
    def test_QApplication(self):
        try:
            from PyKDE4.kdeui import KWallet
            from PyQt4.QtGui import QApplication
        except:
            return

        app = QApplication([])
        wallet = kwallet.open_kwallet()
        self.assertIsInstance(wallet, KWallet.Wallet)
        app.exit()
Esempio n. 4
0
    def test_QApplication(self):
        try:
            from PyKDE4.kdeui import KWallet
            from PyQt4.QtGui import QApplication
        except:
            return

        app = QApplication([])
        wallet = kwallet.open_kwallet()
        self.assertIsInstance(wallet, KWallet.Wallet)
        app.exit()