'Order script scoring.'

def test_order(self):

    sq = self.fv.get_es_feed_query(self.sq).to_dict()
    ok_(({'term': {'region': 1}} in sq['query']['function_score']['functions'][0]['filter']['bool']['must']))
    ok_(({'term': {'item_type': 'shelf'}} in sq['query']['function_score']['functions'][0]['filter']['bool']['must_not']))
    eq_(sq['query']['function_score']['functions'][0]['field_value_factor'], {'field': 'order', 'modifier': 'reciprocal'})
