Example #1
0
 def test_create_index_from_scratch_with_profiling(self):
     with mock.patch.object(script.Profiling, 'ACTIVATED', True):
         script.update_data_profiling_wrapper(
             create_full=True,
             create_partial=False,
             disable_parallel_computing=True,
         )
Example #2
0
 def test_create_index_from_scratch(self):
     # longer ES timeout needed for slow docker performance in local dev on Mac OS when running `make test-scripts`
     with mock.patch.object(settings, 'ES_TIMEOUT', 30):
         script.update_data_profiling_wrapper(
             create_full=True,
             create_partial=False,
             disable_parallel_computing=True,
         )
Example #3
0
    def test_create_index_from_scratch_with_profiling_create_partial(self):
        with mock.patch.object(script.Profiling, 'ACTIVATED', True):
            script.update_data_profiling_wrapper(
                create_full=False,
                create_partial=True,
                disable_parallel_computing=True,
            )

        # create_partial version of the script left ES data in an inconsistent state:
        # office data for only one departement
        # no ogr data nor location data
        # thus we need to rebuild normal data now:
        script.update_data_profiling_wrapper(
            create_full=True,
            create_partial=False,
            disable_parallel_computing=True,
        )
Example #4
0
 def test_create_index(self):
     script.update_data_profiling_wrapper(
         create_full=False,
         create_partial=False,
         disable_parallel_computing=True,
     )