Пример #1
0
 def test_password_set_failure(self, monkeypatch):
     def mockreturn(system, username, password):
         return False
     monkeypatch.setattr(keyring, "set_password", mockreturn)
     keyring.set_keyring(TestKeyring())
     result = credentials.password_set('user', 'password')
     assert not result
Пример #2
0
    def test_password_set_failure(self, monkeypatch):
        def mockreturn(system, username, password):
            return False

        monkeypatch.setattr(keyring, "set_password", mockreturn)
        keyring.set_keyring(TestKeyring())
        result = credentials.password_set('user', 'password')
        assert not result
Пример #3
0
 def test_password_set(self):
     keyring.set_keyring(TestKeyring())
     result = credentials.password_set('user', 'password')
     assert result
Пример #4
0
 def test_password_set(self):
     keyring.set_keyring(TestKeyring())
     result = credentials.password_set('user', 'password')
     assert result