Beispiel #1
0
    def it_changes_password(self, data_source):
        data_source.authenticate.return_value = None
        data_source.set_password.return_value = None

        keychain = Keychain(data_source)
        keychain.unlock("password")
        keychain.set_password("foobar")

        data_source.set_password.assert_called_with("foobar")
Beispiel #2
0
    def it_changes_password(self, data_source):
        data_source.authenticate.return_value = None
        data_source.set_password.return_value = None

        keychain = Keychain(data_source)
        keychain.unlock("password")
        keychain.set_password("foobar")

        data_source.set_password.assert_called_with("foobar")
Beispiel #3
0
    def it_throws_if_setting_password_on_a_locked_keychain(self, data_source):
        data_source.is_authenticated.return_value = False
        keychain = Keychain(data_source)

        keychain.set_password("foobar")
Beispiel #4
0
    def it_throws_if_setting_password_on_a_locked_keychain(self, data_source):
        data_source.is_authenticated.return_value = False
        keychain = Keychain(data_source)

        keychain.set_password("foobar")