# Path: openid/yadis/accept.py
# def generateAcceptHeader(*elements):
# def parseAcceptHeader(value):
# def matchTypes(accept_types, have_types):
# def getAcceptable(accept_header, have_types):


import os.path
import unittest
from openid.yadis import accept
    return expected


class MatchAcceptTest(unittest.TestCase):

    def runTest(self):
        lines = getTestData()
        chunks = chunk(lines)
        data_sets = [parseLines(line) for line in chunks]
        for data in data_sets:
            lnos = []
            lno, accept_header = data['accept']
            lnos.append(lno)
            lno, avail_data = data['available']
            lnos.append(lno)
            try:
                available = parseAvailable(avail_data)
            except Exception:
                print('On line', lno)
                raise

            lno, exp_data = data['expected']
            lnos.append(lno)
            try:
                expected = parseExpected(exp_data)
            except Exception:
                print('On line', lno)
                raise

            accepted = accept.parseAcceptHeader(accept_header)

# Path: openid/yadis/accept.py
# def generateAcceptHeader(*elements):
# def parseAcceptHeader(value):
# def matchTypes(accept_types, have_types):
# def getAcceptable(accept_header, have_types):


# Path: openid/test/test_accept.py
import os.path
import unittest
from openid.yadis import accept

    return expected


class MatchAcceptTest(unittest.TestCase):

    def runTest(self):
        lines = getTestData()
        chunks = chunk(lines)
        data_sets = [parseLines(line) for line in chunks]
        for data in data_sets:
            lnos = []
            lno, accept_header = data['accept']
            lnos.append(lno)
            lno, avail_data = data['available']
            lnos.append(lno)
            try:
                available = parseAvailable(avail_data)
            except Exception:
                print('On line', lno)
                raise

            lno, exp_data = data['expected']
            lnos.append(lno)
            try:
                expected = parseExpected(exp_data)
            except Exception:
                print('On line', lno)
                raise

            accepted = accept.parseAcceptHeader(accept_header)

            actual = accept.matchTypes(accepted, available)