# Path: osprofiler/drivers/loginsight.py
# LOG = log.getLogger(__name__)
#     LI_OSPROFILER_AGENT_ID = "F52D775B-6017-4787-8C8A-F21AE0AEC057"
#     SESSIONS_PATH = "api/v1/sessions"
#     CURRENT_SESSIONS_PATH = "api/v1/sessions/current"
#     EVENTS_INGEST_PATH = "api/v1/events/ingest/%s" % LI_OSPROFILER_AGENT_ID
#     QUERY_EVENTS_BASE_PATH = "api/v1/events"
# class LogInsightDriver(base.Driver):
# class LogInsightClient(object):
#     def __init__(
#             self, connection_str, project=None, service=None, host=None,
#             **kwargs):
#     def get_name(cls):
#     def notify(self, info):
#         def _create_field(name, content):
#     def get_report(self, base_id):
#     def __init__(self, host, username, password, api_port=9000,
#                  api_ssl_port=9543, query_timeout=60000):
#     def _build_base_url(self, scheme):
#     def _check_response(self, resp):
#     def _send_request(
#             self, method, scheme, path, headers=None, body=None, params=None):
#     def _get_auth_header(self):
#     def _trunc_session_id(self):
#     def _is_current_session_active(self):
#     def login(self):
#     def send_event(self, event):
#     def query_events(self, params):
#         def _query_events():
# 
# Path: osprofiler/exc.py
# class CommandError(Exception):
# class LogInsightAPIError(Exception):
# class LogInsightLoginTimeout(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
# 
# Path: osprofiler/tests/test.py
# class TestCase(testcase.TestCase):
# class FunctionalTestCase(TestCase):
#     def setUp(self):


import json
import ddt
from unittest import mock
from osprofiler.drivers import loginsight
from osprofiler import exc
from osprofiler.tests import test
# Copyright (c) 2016 VMware, Inc.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.





@ddt.ddt
class LogInsightDriverTestCase(test.TestCase):

    BASE_ID = "8d28af1e-acc0-498c-9890-6908e33eff5f"

    def setUp(self):
        super(LogInsightDriverTestCase, self).setUp()

# Path: osprofiler/drivers/loginsight.py
# LOG = log.getLogger(__name__)
#     LI_OSPROFILER_AGENT_ID = "F52D775B-6017-4787-8C8A-F21AE0AEC057"
#     SESSIONS_PATH = "api/v1/sessions"
#     CURRENT_SESSIONS_PATH = "api/v1/sessions/current"
#     EVENTS_INGEST_PATH = "api/v1/events/ingest/%s" % LI_OSPROFILER_AGENT_ID
#     QUERY_EVENTS_BASE_PATH = "api/v1/events"
# class LogInsightDriver(base.Driver):
# class LogInsightClient(object):
#     def __init__(
#             self, connection_str, project=None, service=None, host=None,
#             **kwargs):
#     def get_name(cls):
#     def notify(self, info):
#         def _create_field(name, content):
#     def get_report(self, base_id):
#     def __init__(self, host, username, password, api_port=9000,
#                  api_ssl_port=9543, query_timeout=60000):
#     def _build_base_url(self, scheme):
#     def _check_response(self, resp):
#     def _send_request(
#             self, method, scheme, path, headers=None, body=None, params=None):
#     def _get_auth_header(self):
#     def _trunc_session_id(self):
#     def _is_current_session_active(self):
#     def login(self):
#     def send_event(self, event):
#     def query_events(self, params):
#         def _query_events():
# 
# Path: osprofiler/exc.py
# class CommandError(Exception):
# class LogInsightAPIError(Exception):
# class LogInsightLoginTimeout(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
# 
# Path: osprofiler/tests/test.py
# class TestCase(testcase.TestCase):
# class FunctionalTestCase(TestCase):
#     def setUp(self):


# Path: osprofiler/tests/unit/drivers/test_loginsight.py
import json
import ddt
from unittest import mock
from osprofiler.drivers import loginsight
from osprofiler import exc
from osprofiler.tests import test

# Copyright (c) 2016 VMware, Inc.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.





@ddt.ddt
class LogInsightDriverTestCase(test.TestCase):

    BASE_ID = "8d28af1e-acc0-498c-9890-6908e33eff5f"

    def setUp(self):
        super(LogInsightDriverTestCase, self).setUp()

        self._client = mock.Mock(spec=loginsight.LogInsightClient)