def native_(s, encoding='latin-1', errors='strict'):
        if isinstance(s, text_type):
            return s.encode(encoding, errors)
        return str(s)
Creates an ElastAlert instance and run's over for a specific rule using either real or mock data.
dataset/ETHPy150Open TurboGears/gearbox/gearbox/utils/copydir.py/native_--crossover with--dataset/ETHPy150Open Yelp/elastalert/elastalert/test_rule.py/MockElastAlerter.run_elastalert