# Path: cloudevents/sdk/exceptions.py
# class UnsupportedEvent(Exception):
# class InvalidDataUnmarshaller(Exception):
# class InvalidDataMarshaller(Exception):
# class NoSuchConverter(Exception):
# class UnsupportedEventConverter(Exception):
#     def __init__(self, event_class):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self, converter_type):
#     def __init__(self, content_type):
# 
# Path: cloudevents/sdk/converters/base.py
# class Converter(object):
#     TYPE = None
#     def read(
#         self,
#         event,
#         headers: dict,
#         body: typing.IO,
#         data_unmarshaller: typing.Callable,
#     ) -> base.BaseEvent:
#     def event_supported(self, event: object) -> bool:
#     def can_read(self, content_type: str) -> bool:
#     def write(
#         self, event: base.BaseEvent, data_marshaller: typing.Callable
#     ) -> (dict, object):
# 
# Path: cloudevents/sdk/converters/binary.py
# class BinaryHTTPCloudEventConverter(base.Converter):
#     TYPE = "binary"
#     SUPPORTED_VERSIONS = [v03.Event, v1.Event]
#     def can_read(
#         self,
#         content_type: str = None,
#         headers: typing.Dict[str, str] = {"ce-specversion": None},
#     ) -> bool:
#     def event_supported(self, event: object) -> bool:
#     def read(
#         self,
#         event: event_base.BaseEvent,
#         headers: dict,
#         body: typing.IO,
#         data_unmarshaller: types.UnmarshallerType,
#     ) -> event_base.BaseEvent:
#     def write(
#         self, event: event_base.BaseEvent, data_marshaller: types.MarshallerType
#     ) -> (dict, bytes):
# def NewBinaryHTTPCloudEventConverter() -> BinaryHTTPCloudEventConverter:


import pytest
from cloudevents.sdk import exceptions
from cloudevents.sdk.converters import base, binary
# 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.



def test_binary_converter_raise_unsupported():
    with pytest.raises(exceptions.UnsupportedEvent):
        cnvtr = binary.BinaryHTTPCloudEventConverter()
        cnvtr.read(None, {}, None, None)


def test_base_converters_raise_exceptions():
    with pytest.raises(Exception):

# Path: cloudevents/sdk/exceptions.py
# class UnsupportedEvent(Exception):
# class InvalidDataUnmarshaller(Exception):
# class InvalidDataMarshaller(Exception):
# class NoSuchConverter(Exception):
# class UnsupportedEventConverter(Exception):
#     def __init__(self, event_class):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self, converter_type):
#     def __init__(self, content_type):
# 
# Path: cloudevents/sdk/converters/base.py
# class Converter(object):
#     TYPE = None
#     def read(
#         self,
#         event,
#         headers: dict,
#         body: typing.IO,
#         data_unmarshaller: typing.Callable,
#     ) -> base.BaseEvent:
#     def event_supported(self, event: object) -> bool:
#     def can_read(self, content_type: str) -> bool:
#     def write(
#         self, event: base.BaseEvent, data_marshaller: typing.Callable
#     ) -> (dict, object):
# 
# Path: cloudevents/sdk/converters/binary.py
# class BinaryHTTPCloudEventConverter(base.Converter):
#     TYPE = "binary"
#     SUPPORTED_VERSIONS = [v03.Event, v1.Event]
#     def can_read(
#         self,
#         content_type: str = None,
#         headers: typing.Dict[str, str] = {"ce-specversion": None},
#     ) -> bool:
#     def event_supported(self, event: object) -> bool:
#     def read(
#         self,
#         event: event_base.BaseEvent,
#         headers: dict,
#         body: typing.IO,
#         data_unmarshaller: types.UnmarshallerType,
#     ) -> event_base.BaseEvent:
#     def write(
#         self, event: event_base.BaseEvent, data_marshaller: types.MarshallerType
#     ) -> (dict, bytes):
# def NewBinaryHTTPCloudEventConverter() -> BinaryHTTPCloudEventConverter:


# Path: cloudevents/tests/test_converters.py
import pytest
from cloudevents.sdk import exceptions
from cloudevents.sdk.converters import base, binary

# 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.



def test_binary_converter_raise_unsupported():
    with pytest.raises(exceptions.UnsupportedEvent):
        cnvtr = binary.BinaryHTTPCloudEventConverter()
        cnvtr.read(None, {}, None, None)


def test_base_converters_raise_exceptions():
    with pytest.raises(Exception):

        cnvtr = base.Converter()