'Check if the offer is covered by the mask'

def _match(self, mask, offer):

    _check_offer(offer)
    if ('*' not in mask):
        return (offer.lower() == mask.lower())
    elif (mask == '*/*'):
        return True
    else:
        assert mask.endswith('/*')
        mask_major = mask[:(-2)].lower()
        offer_major = offer.split('/', 1)[0].lower()
        return (offer_major == mask_major)
