Ejemplo n.º 1
0
    def test_delete_multiple_indexers(self):
        MultipleIndexerEntry.objects.all().delete()

        call_command("index", daemonize=False)

        for indexer in space.get_indexers_for_model(MultipleIndexerEntry):
            self.assertEqual(indexer.document_count(), 0)
Ejemplo n.º 2
0
    def test_delete_multiple_indexers(self):
        MultipleIndexerEntry.objects.all().delete()

        call_command("index", daemonize=False)

        for indexer in space.get_indexers_for_model(MultipleIndexerEntry):
            self.assertEqual(indexer.document_count(), 0)
Ejemplo n.º 3
0
 def test_create_multiple_indexers(self):
     for indexer in space.get_indexers_for_model(MultipleIndexerEntry):
         self.assertEqual(indexer.document_count(), 1)
         self.assertEqual(indexer.search("test").count(), 1)
Ejemplo n.º 4
0
 def tearDown(self):
     for indexer in space.get_indexers_for_model(MultipleIndexerEntry):
         indexer.clear()
Ejemplo n.º 5
0
 def test_create_multiple_indexers(self):
     for indexer in space.get_indexers_for_model(MultipleIndexerEntry):
         self.assertEqual(indexer.document_count(), 1)
         self.assertEqual(indexer.search("test").count(), 1)
Ejemplo n.º 6
0
 def tearDown(self):
     for indexer in space.get_indexers_for_model(MultipleIndexerEntry):
         indexer.clear()