def test_spike_deep_key():
    rules = {'threshold_ref': 10,
             'spike_height': 2,
             'timeframe': datetime.timedelta(seconds=10),
             'spike_type': 'both',
             'timestamp_field': '@timestamp',
             'query_key': 'foo.bar.baz'}
    rule = SpikeRule(rules)
    rule.add_data([{'@timestamp': ts_to_dt('2015'), 'foo': {'bar': {'baz': 'LOL'}}}])
    assert rule.cur_windows in 'LOL'
dataset/ETHPy150Open Yelp/elastalert/tests/rules_test.py/test_spike_deep_key/swapped operands of `in`