# Path: grappa_http/operators/base.py
# class BaseOperator(Operator):
#     def isadapter(self, response):
#     def adapt(self, response):
#     def on_access(self, response):
#     def match(self, response, *expected, **kw):


from functools import reduce
from .base import BaseOperator, Operator
    from urlparse import urlparse, parse_qs
    from urllib.parse import urlparse, parse_qs
        self.subject = url.port or (443 if url.scheme == 'https' else 80)
        self.expected = port

        return port == self.subject, ['Missmatched URL ports']


class UrlPathOperator(UrlBaseOperator):
    """
    Asserts HTTP request target URL path value.

    Example::

        # Should style
        res | should.have.url.path('/foo/baz')
        res | should.have.url.path('foo', strict=False)

        # Should style - negation form
        res | should.not_have.url.path('/foo/baz')
        res | should.not_have.url.path('foo', strict=False)

        # Expect style
        res | epect.to.have.url.path('/foo/baz')
        res | epect.to.have.url.path('foo', strict=False)

        # Expect style - negation form
        res | epect.to_not.have.url.path('/foo/baz')
        res | epect.to_not.have.url.path('foo', strict=False)
    """

    # Defines operator kind

# Path: grappa_http/operators/base.py
# class BaseOperator(Operator):
#     def isadapter(self, response):
#     def adapt(self, response):
#     def on_access(self, response):
#     def match(self, response, *expected, **kw):


# Path: grappa_http/operators/url_parts.py
from functools import reduce
from .base import BaseOperator, Operator
    from urlparse import urlparse, parse_qs
    from urllib.parse import urlparse, parse_qs

        self.subject = url.port or (443 if url.scheme == 'https' else 80)
        self.expected = port

        return port == self.subject, ['Missmatched URL ports']


class UrlPathOperator(UrlBaseOperator):
    """
    Asserts HTTP request target URL path value.

    Example::

        # Should style
        res | should.have.url.path('/foo/baz')
        res | should.have.url.path('foo', strict=False)

        # Should style - negation form
        res | should.not_have.url.path('/foo/baz')
        res | should.not_have.url.path('foo', strict=False)

        # Expect style
        res | epect.to.have.url.path('/foo/baz')
        res | epect.to.have.url.path('foo', strict=False)

        # Expect style - negation form
        res | epect.to_not.have.url.path('/foo/baz')
        res | epect.to_not.have.url.path('foo', strict=False)
    """

    # Defines operator kind

    kind = Operator.Type.MATCHER