'Make sure that a time based request to index does not index anything too old'

def _test_time_based_index(self, store):

    self.publish_item(store, self.vertical.location)
    indexed_count = self.reindex_course(store)
    self.assertEqual(indexed_count, 4)
    sequential2 = ItemFactory.create(parent_location=self.chapter.location, category='sequential', display_name='Section    2', modulestore=store, publish_item=True, start=datetime(2015, 3, 1, tzinfo=UTC))
    vertical2 = ItemFactory.create(parent_location=sequential2.location, category='vertical', display_name='Subsection    2', modulestore=store, publish_item=True)
    ItemFactory.create(parent_location=vertical2.location, category='html', display_name='Some    other    content', publish_item=False, modulestore=store)
    before_time = datetime.now(UTC)
    self.publish_item(store, vertical2.location)
    new_indexed_count = self.index_recent_changes(store, before_time)
    self.assertEqual(new_indexed_count, 5)
    indexed_count = self.reindex_course(store)
    self.assertEqual(indexed_count, 7)
