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)
 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)
Exemple #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()
    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()
    def test_QApplication(self):
        try:
            from PyKDE4.kdeui import KWallet
            from PyQt4.QtGui import QApplication
        except:
            return

        app = QApplication([])
        wallet = kwallet.open_kwallet()
        self.assertTrue(isinstance(wallet, KWallet.Wallet),
                        msg="The object wallet should be type "
                        "<KWallet.Wallet> but it is: %s" % repr(wallet))
        app.exit()
Exemple #6
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.assertTrue(isinstance(wallet, KWallet.Wallet),
                        msg="The object wallet should be type "
                        "<KWallet.Wallet> but it is: %s" % repr(wallet))
        app.exit()