~shanepatrickfagan/ubuntu-sso-client/refactoring_mandel

« back to all changes in this revision

Viewing changes to ubuntu_sso/keyring/tests/test_windows.py

Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
    @inlineCallbacks
46
46
    def test_get_credentials(self):
47
 
        """Test deleting the credentials."""
 
47
        """Test getting the credentials."""
48
48
        app_name = 'name'
49
49
        password = dict(password='password')
50
50
        self.keyring_lib.get_password(app_name, USERNAME)
54
54
        self.assertEqual(password, result)
55
55
 
56
56
    @inlineCallbacks
 
57
    def test_get_credentials_not_present(self):
 
58
        """Test getting creds that are not present."""
 
59
        app_name = 'name'
 
60
        self.keyring_lib.get_password(app_name, USERNAME)
 
61
        self.mocker.result(None)
 
62
        self.mocker.replay()
 
63
        result = yield self.keyring.get_credentials(app_name)
 
64
        self.assertEqual(None, result)
 
65
 
 
66
    @inlineCallbacks
57
67
    def test_delete_credentials(self):
58
68
        """Test deleting the credentials."""
59
69
        app_name = 'name'