def test_load_credentials_calls_get_password(self, mock_credentials_data,
                                              mock_store_wrapper,
                                              mock_cred_provider):
     credential_provider = KeystoreCredentialsProvider()
     credentials_data = credential_provider.load(TEST_HOSTNAME)
     calls = [
         call(TEST_HOSTNAME, MACHINE),
         call(TEST_HOSTNAME, USERNAME),
         call(TEST_HOSTNAME, PASSWORD)
     ]
     mock_store_wrapper.assert_has_calls(calls)
     self.assertEquals(MockCredentials.machine, credentials_data.machine)
     self.assertEquals(MockCredentials.username, credentials_data.username)
     self.assertEquals(MockCredentials.password, credentials_data.password)
 def test_load_credentials_do_not_exist_raises_credential_retrieval_exception(
         self, mock_cred_provider):
     with self.assertRaises(CredentialRetrievalException):
         credential_provider = KeystoreCredentialsProvider()
         credential_provider.load(TEST_HOSTNAME)