'Assert that an XML element has at least the specified set of
attributes.
Arguments:
element (ElementTree.Element): the element to check.
attrs (dict): A dict mapping {attr: regex} where
each value in the dict is a regular expression
to match against the named attribute.'

def assertElementAttrsSubset(self, element, attrs):

    for (attribute, regex) in attrs.items():
        self.assertRegexpMatches(element.get(attribute), regex)
