# Path: openid/yadis/services.py
# def getServiceEndpoints(input_url, flt=None):
# def applyFilter(normalized_uri, xrd_data, flt=None):
# 
# Path: openid/yadis/discover.py
# class DiscoveryFailure(Exception):
#     """Raised when a YADIS protocol error occurs in the discovery process"""
#     identity_url = None
# 
#     def __init__(self, message, http_response):
#         Exception.__init__(self, message)
#         self.http_response = http_response
# 
# class DiscoveryResult(object):
#     """Contains the result of performing Yadis discovery on a URI"""
# 
#     # The URI that was passed to the fetcher
#     request_uri = None
# 
#     # The result of following redirects from the request_uri
#     normalized_uri = None
# 
#     # The URI from which the response text was returned (set to
#     # None if there was no XRDS document found)
#     xrds_uri = None
# 
#     # The content-type returned with the response_text
#     content_type = None
# 
#     # The document returned from the xrds_uri
#     response_text = None
# 
#     def __init__(self, request_uri):
#         """Initialize the state of the object
# 
#         sets all attributes to None except the request_uri
#         """
#         self.request_uri = request_uri
# 
#     def usedYadisLocation(self):
#         """Was the Yadis protocol's indirection used?"""
#         if self.xrds_uri is None:
#             return False
#         return self.normalized_uri != self.xrds_uri
# 
#     def isXRDS(self):
#         """Is the response text supposed to be an XRDS document?"""
#         return (self.usedYadisLocation() or self.content_type == YADIS_CONTENT_TYPE)


import unittest
from openid.yadis import services
from openid.yadis.discover import DiscoveryFailure, DiscoveryResult
from __future__ import unicode_literals




class TestGetServiceEndpoints(unittest.TestCase):
    def setUp(self):
        self.orig_discover = services.discover
        services.discover = self.discover

    def tearDown(self):

# Path: openid/yadis/services.py
# def getServiceEndpoints(input_url, flt=None):
# def applyFilter(normalized_uri, xrd_data, flt=None):
# 
# Path: openid/yadis/discover.py
# class DiscoveryFailure(Exception):
#     """Raised when a YADIS protocol error occurs in the discovery process"""
#     identity_url = None
# 
#     def __init__(self, message, http_response):
#         Exception.__init__(self, message)
#         self.http_response = http_response
# 
# class DiscoveryResult(object):
#     """Contains the result of performing Yadis discovery on a URI"""
# 
#     # The URI that was passed to the fetcher
#     request_uri = None
# 
#     # The result of following redirects from the request_uri
#     normalized_uri = None
# 
#     # The URI from which the response text was returned (set to
#     # None if there was no XRDS document found)
#     xrds_uri = None
# 
#     # The content-type returned with the response_text
#     content_type = None
# 
#     # The document returned from the xrds_uri
#     response_text = None
# 
#     def __init__(self, request_uri):
#         """Initialize the state of the object
# 
#         sets all attributes to None except the request_uri
#         """
#         self.request_uri = request_uri
# 
#     def usedYadisLocation(self):
#         """Was the Yadis protocol's indirection used?"""
#         if self.xrds_uri is None:
#             return False
#         return self.normalized_uri != self.xrds_uri
# 
#     def isXRDS(self):
#         """Is the response text supposed to be an XRDS document?"""
#         return (self.usedYadisLocation() or self.content_type == YADIS_CONTENT_TYPE)


# Path: openid/test/test_services.py
import unittest
from openid.yadis import services
from openid.yadis.discover import DiscoveryFailure, DiscoveryResult

from __future__ import unicode_literals




class TestGetServiceEndpoints(unittest.TestCase):
    def setUp(self):
        self.orig_discover = services.discover
        services.discover = self.discover

    def tearDown(self):

        services.discover = self.orig_discover