'Ensure handler methods are *always* called with lowered-cased
tag and attribute names'

def test_case_sensitivity(self):

    def islower(s):
        il = False
        if isinstance(s, basestring):
            il = s.islower()
        else:
            il = all((k.islower() for k in s))
        assert il, ("'%s'    is    not    lowered-case" % s)
        return il
    def start_wrapper(orig_start, tag):
        islower(tag.tag)
        islower(tag.attrib)
        return orig_start(tag)
    tags = (A_LINK_ABSOLUTE, INPUT_CHECKBOX_WITH_NAME, SELECT_WITH_NAME, TEXTAREA_WITH_ID_AND_DATA, INPUT_HIDDEN)
    ops = ('lower', 'upper', 'title')
    for indexes in combinations(range(len(tags)), 2):
        body_elems = []
        for (index, tag) in enumerate(tags):
            ele = tag
            if (index in indexes):
                ele = getattr(tag, choice(ops))()
            body_elems.append(ele)
        body = (HTML_DOC % {'head': '', 'body': ''.join(body_elems)})
        resp = build_http_response(self.url, body)
        p = SGMLParser(resp)
        orig_start = p.start
        wrapped_start = partial(start_wrapper, orig_start)
        p.start = wrapped_start
        p.parse()
