# Path: soco/exceptions.py
# class SoCoUPnPException(SoCoException):
# 
#     """A UPnP Fault Code, raised in response to actions sent over the
#     network.
# 
#     """
# 
#     def __init__(self, message, error_code, error_xml, error_description=""):
#         """
#         Args:
#             message (str): The message from the server.
#             error_code (str): The UPnP Error Code as a string.
#             error_xml (str): The xml containing the error, as a utf-8
#                 encoded string.
#             error_description (str): A description of the error. Default is ""
#         """
#         super().__init__()
#         self.message = message
#         self.error_code = error_code
#         self.error_description = error_description
#         self.error_xml = error_xml
# 
#     def __str__(self):
#         return self.message


from soco.exceptions import SoCoUPnPException
                'parentID="S:" restricted="true"><dc:title>//share_host/music_01/Music/'
                "Lossless"
                "</dc:title><upnp:class>object.container</upnp:class><res "
                'protocolInfo="x-rincon-playlist:*:*:*">'
                "x-rincon-playlist:RINCON_XXXXXXXXXXXXX1400"
                "#S://share_host/music_01/Music/Lossless</res></container>"
                '<container id="S://share_host_2/music_01" parentID="S:" '
                'restricted="true">'
                "<dc:title>//share_host_2/music_01</dc:title>"
                "<upnp:class>object.container"
                '</upnp:class><res protocolInfo="x-rincon-playlist:*:*:*">'
                "x-rincon-playlist"
                ":RINCON_XXXXXXXXXXXXX1400#S://share_host_2/music_01</res>"
                "</container></DIDL-Lite>"
            ),
        }
        results = moco.music_library.list_library_shares()
        assert len(results) == 2
        assert "//share_host/music_01/Music/Lossless" in results
        assert "//share_host_2/music_01" in results

        moco.contentDirectory.Browse.return_value = {
            "TotalMatches": "1",
            "NumberReturned": "1",
            "UpdateID": "0",
            "Result": (
                '<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" '
                'xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" '
                'xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" '
                'xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">'

# Path: soco/exceptions.py
# class SoCoUPnPException(SoCoException):
# 
#     """A UPnP Fault Code, raised in response to actions sent over the
#     network.
# 
#     """
# 
#     def __init__(self, message, error_code, error_xml, error_description=""):
#         """
#         Args:
#             message (str): The message from the server.
#             error_code (str): The UPnP Error Code as a string.
#             error_xml (str): The xml containing the error, as a utf-8
#                 encoded string.
#             error_description (str): A description of the error. Default is ""
#         """
#         super().__init__()
#         self.message = message
#         self.error_code = error_code
#         self.error_description = error_description
#         self.error_xml = error_xml
# 
#     def __str__(self):
#         return self.message


# Path: tests/test_music_library.py
from soco.exceptions import SoCoUPnPException

                'parentID="S:" restricted="true"><dc:title>//share_host/music_01/Music/'
                "Lossless"
                "</dc:title><upnp:class>object.container</upnp:class><res "
                'protocolInfo="x-rincon-playlist:*:*:*">'
                "x-rincon-playlist:RINCON_XXXXXXXXXXXXX1400"
                "#S://share_host/music_01/Music/Lossless</res></container>"
                '<container id="S://share_host_2/music_01" parentID="S:" '
                'restricted="true">'
                "<dc:title>//share_host_2/music_01</dc:title>"
                "<upnp:class>object.container"
                '</upnp:class><res protocolInfo="x-rincon-playlist:*:*:*">'
                "x-rincon-playlist"
                ":RINCON_XXXXXXXXXXXXX1400#S://share_host_2/music_01</res>"
                "</container></DIDL-Lite>"
            ),
        }
        results = moco.music_library.list_library_shares()
        assert len(results) == 2
        assert "//share_host/music_01/Music/Lossless" in results
        assert "//share_host_2/music_01" in results

        moco.contentDirectory.Browse.return_value = {
            "TotalMatches": "1",
            "NumberReturned": "1",
            "UpdateID": "0",
            "Result": (
                '<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" '
                'xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" '
                'xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" '
                'xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">'

                '<container id="S://share_host/music_01/Music/Lossless" parentID="S:" '