

def test_endpoint_with_no_token(self, mock_ksclient):
    plugin = auth.KeystoneAuthPlugin(username='fake-username', password='fake-password', tenant_name='fake-tenant-name', auth_url='http://auth', endpoint='http://solum')
    self.cs = client.HTTPClient(auth_plugin=plugin)
    self.cs.authenticate()
    mock_ksclient.assert_called_with(username='fake-username', password='fake-password', tenant_name='fake-tenant-name', auth_url='http://auth')
    (token, endpoint) = self.cs.auth_plugin.token_and_endpoint('fake-endpoint-type', 'fake-service-type')
    self.assertIsInstance(token, mock.MagicMock)
    self.assertEqual('http://solum', endpoint)

dataset/ETHPy150Open openstack/python-solumclient/solumclient/tests/common/test_auth.py KeystoneAuthPluginTest.test_endpoint_with_no_token/original