Example #1
0
    def tearDown(self):
        """Cleanup environment."""
        from resolwe.elastic.builder import index_builder

        super().tearDown()

        # Reset Elastic search indices.
        index_builder.destroy()
Example #2
0
    def setUp(self):
        """Delete any existing data and prepare fresh indexes."""
        from resolwe.elastic.builder import index_builder, IndexBuilder
        # Connect all signals
        from resolwe.elastic import signals

        super(TransactionElasticSearchTestCase, self).setUp()

        index_builder.destroy()  # Delete default indexes

        self._test_index_builder = IndexBuilder()
        # Mock index builder
        signals.index_builder = self._test_index_builder
Example #3
0
 def tearDown(self):
     index_builder.destroy()
     super().tearDown()
Example #4
0
 def tearDown(self):
     index_builder.destroy()
     super(IndexViewsetTest, self).tearDown()
Example #5
0
 def tearDown(self):
     index_builder.destroy()
     super().tearDown()