'Verify the data we are indexing.'

def test_data_in_index(self):

    p = ProductFactory()
    base_doc = DocumentFactory(locale='en-US', products=[p])
    d = DocumentFactory(locale='es', parent=base_doc)
    r = RevisionFactory(document=d, is_approved=True)
    self.refresh()
    eq_(RevisionMetricsMappingType.search().count(), 1)
    data = RevisionMetricsMappingType.search()[0]
    eq_(data['is_approved'], r.is_approved)
    eq_(data['locale'], d.locale)
    eq_(data['product'], [p.slug])
    eq_(data['creator_id'], r.creator_id)
