old_contents: import unittest
  
  from pyramid import testing
  
  
  class InlcudemeIntegrationTest(unittest.TestCase):
  
      def setUp(self):
          self.config = testing.setUp()
          self.config.include('adhocracy.catalog')
  
      def tearDown(self):
          testing.tearDown()
  
      def test_add_indexing_adapter(self):
          from substanced.interfaces import IIndexingActionProcessor
          assert IIndexingActionProcessor(object()) is not None
  
      def test_add_directives(self):
          assert 'add_catalog_factory' in self.config.registry._directives
          assert 'add_indexview' in self.config.registry._directives
  
new_contents: from pyramid import testing
  from pytest import fixture
  from pytest import mark
  
  
  @fixture
  def integration(config):
      config.include('adhocracy.events')
      config.include('adhocracy.registry')
      config.include('adhocracy.graph')
      config.include('adhocracy.catalog')
  
  @mark.usefixtures('integration')
  def test_add_indexing_adapter():
      from substanced.interfaces import IIndexingActionProcessor
      assert IIndexingActionProcessor(object()) is not None
  
  
  @mark.usefixtures('integration')
  def test_add_directives(registry):
      assert 'add_catalog_factory' in registry._directives
      assert 'add_indexview' in registry._directives
  
  
  @mark.usefixtures('integration')
  def test_index_resource(pool_graph_catalog,):
      from substanced.util import find_service
      pool = pool_graph_catalog
      pool.add('child', testing.DummyResource())
      name_index = find_service(pool, 'catalogs', 'system', 'name')
      assert 'child' in [x for x in name_index.unique_values()]
  
  
  
  
  
subject: add test to check that the catalog indexing is working