# Path: ironicclient/tests/unit/utils.py
# class BaseTestCase(testtools.TestCase):
# class FakeAPI(object):
# class FakeConnection(object):
# class FakeResponse(object):
#     def setUp(self):
#     def __init__(self, responses, path_prefix=None):
#     def _request(self, method, url, headers=None, body=None, params=None):
#     def raw_request(self, *args, **kwargs):
#     def json_request(self, *args, **kwargs):
#     def __init__(self, response=None, path_prefix=None):
#     def request(self, method, conn_url, **kwargs):
#     def setresponse(self, response):
#     def getresponse(self):
#     def __repr__(self):
#     def __init__(self, headers, body=None, version=None, status=None,
#                  reason=None, request_headers={}):
#     def getheaders(self):
#     def getheader(self, key, default):
#     def read(self, amt):
#     def __repr__(self):
# def mockSessionResponse(headers, content=None, status_code=None, version=None,
#                         request_headers={}):
# def mockSession(headers, content=None, status_code=None, version=None):
# 
# Path: ironicclient/v1/events.py
# class Event(base.Resource):
# class EventManager(base.CreateManager):
#     def __repr__(self):


import testtools
from ironicclient.tests.unit import utils
from ironicclient.v1 import events


FAKE_EVENT = {"event": "type.event"}
FAKE_NETWORK_PORT_EVENT = {
    'event': "network.bind_port",
    'port_id': '11111111-aaaa-bbbb-cccc-555555555555',
    'mac_address': 'de:ad:ca:fe:ba:be',
    'status': 'ACTIVE',
    'device_id': '22222222-aaaa-bbbb-cccc-555555555555',
    'binding:host_id': '22222222-aaaa-bbbb-cccc-555555555555',
    'binding:vnic_type': 'baremetal',
}
FAKE_EVENTS = {'events': [FAKE_EVENT]}
FAKE_NETWORK_PORT_EVENTS = {'events': [FAKE_NETWORK_PORT_EVENT]}

fake_responses = {
    '/v1/events':
        {
            'POST': (
                {},
                None
            )
        }
}


class EventManagerTest(testtools.TestCase):
    def setUp(self):
        super(EventManagerTest, self).setUp()
        self.api = utils.FakeAPI(fake_responses)

# Path: ironicclient/tests/unit/utils.py
# class BaseTestCase(testtools.TestCase):
# class FakeAPI(object):
# class FakeConnection(object):
# class FakeResponse(object):
#     def setUp(self):
#     def __init__(self, responses, path_prefix=None):
#     def _request(self, method, url, headers=None, body=None, params=None):
#     def raw_request(self, *args, **kwargs):
#     def json_request(self, *args, **kwargs):
#     def __init__(self, response=None, path_prefix=None):
#     def request(self, method, conn_url, **kwargs):
#     def setresponse(self, response):
#     def getresponse(self):
#     def __repr__(self):
#     def __init__(self, headers, body=None, version=None, status=None,
#                  reason=None, request_headers={}):
#     def getheaders(self):
#     def getheader(self, key, default):
#     def read(self, amt):
#     def __repr__(self):
# def mockSessionResponse(headers, content=None, status_code=None, version=None,
#                         request_headers={}):
# def mockSession(headers, content=None, status_code=None, version=None):
# 
# Path: ironicclient/v1/events.py
# class Event(base.Resource):
# class EventManager(base.CreateManager):
#     def __repr__(self):


# Path: ironicclient/tests/unit/v1/test_events.py
import testtools
from ironicclient.tests.unit import utils
from ironicclient.v1 import events



FAKE_EVENT = {"event": "type.event"}
FAKE_NETWORK_PORT_EVENT = {
    'event': "network.bind_port",
    'port_id': '11111111-aaaa-bbbb-cccc-555555555555',
    'mac_address': 'de:ad:ca:fe:ba:be',
    'status': 'ACTIVE',
    'device_id': '22222222-aaaa-bbbb-cccc-555555555555',
    'binding:host_id': '22222222-aaaa-bbbb-cccc-555555555555',
    'binding:vnic_type': 'baremetal',
}
FAKE_EVENTS = {'events': [FAKE_EVENT]}
FAKE_NETWORK_PORT_EVENTS = {'events': [FAKE_NETWORK_PORT_EVENT]}

fake_responses = {
    '/v1/events':
        {
            'POST': (
                {},
                None
            )
        }
}


class EventManagerTest(testtools.TestCase):
    def setUp(self):
        super(EventManagerTest, self).setUp()
        self.api = utils.FakeAPI(fake_responses)

        self.mgr = events.EventManager(self.api)