def test_passes_reboot(self):

        # 1) consecutive propagations should not be permitted
        logger.debug('#### FIRST PART OF THE TEST, CURRENT INTERVAL')

        pass_models.PassSlots.objects.propagate()
        sc_passes_n_1 = pass_models.PassSlots.objects.filter(
            spacecraft=self.__sc_1
        ).count()
        pass_models.PassSlots.objects.propagate()
        sc_passes_n_2 = pass_models.PassSlots.objects.filter(
            spacecraft=self.__sc_1
        ).count()
        self.assertEquals(sc_passes_n_1, sc_passes_n_2)

        # 2) now, we change the interval of application for avoiding reboots
        logger.debug('#### SECOND PART OF THE TEST, FUTURE INTERVAL')

        interval = (
            sn_misc.get_next_midnight() + py_timedelta(days=30),
            sn_misc.get_next_midnight() + py_timedelta(days=33)
        )
        pass_models.PassSlots.objects.propagate(interval=interval)
        sc_passes_n_3 = pass_models.PassSlots.objects.filter(
            spacecraft=self.__sc_1
        ).count()
        self.assertGreater(sc_passes_n_3, sc_passes_n_2)
        pass_models.PassSlots.objects.propagate(interval=interval)
        sc_passes_n_4 = pass_models.PassSlots.objects.filter(
            spacecraft=self.__sc_1
        ).count()
        self.assertEquals(sc_passes_n_4, sc_passes_n_3)
Changes the path for this module.
dataset/ETHPy150Open satnet-project/server/services/simulation/tests/models/test_passes.py/TestModels.test_passes_reboot--crossover with--dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/template_objects.py/Module.SetPath