'Assert header value with test (lambda function or value)'

def assert_headers(self, res, name, test):

    for value in self.find_headers(res, name):
        if (callable(test) and test(value)):
            return
        elif (value == test):
            return
    raise AssertionError(('No    matching    %s    header    found' % name))
