def setUp(self): self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__sc_1_id = 'sc-xatcobeo' self.__sc_1_ch_1_id = 'xatco-fm-1' self.__sc_1_ch_1_f = 437000000 from services.configuration.signals import tle from services.scheduling.signals import compatibility from services.scheduling.signals import availability self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id ) self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, )
def setUp(self): self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'uvigo' self.__gs_1_ch_1_id = 'qpsk-gs-1' self.__sc_1_id = 'xatcobe-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'qpsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__band = db_tools.create_band() self.__test_user_profile = db_tools.create_user_profile() self.__simulator = simulation.OrbitalSimulator() self.__gs_1 = db_tools.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_1_id, contact_elevation=0, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id ) self.__sc_1 = db_tools.create_sc( user_profile=self.__test_user_profile, identifier=self.__sc_1_id, tle_id=self.__sc_1_tle_id ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, )
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL) # noinspection PyUnresolvedReferences from services.scheduling.signals import compatibility self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__gs_1_ch_2_id = 'chan-cas-2' self.__gs_1_ch_3_id = 'chan-cas-3' self.__sc_1_id = 'sc-xatcobeo' self.__sc_1_ch_1_id = 'xatco-fm-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_2_id = 'xatco-fm-2' self.__sc_1_ch_3_id = 'xatco-fm-3' self.__sc_1_ch_4_id = 'xatco-afsk-1' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__sc = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id )
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__sc_1_id = 'sc-xatcobeo' self.__sc_1_ch_1_id = 'xatco-fm-1' self.__sc_1_ch_2_id = 'xatco-fm-2' self.__sc_1_ch_3_id = 'xatco-fm-3' self.__sc_1_ch_4_id = 'xatco-afsk-1' self.__band = sn_helpers.create_band() self.__test_user_profile = sn_helpers.create_user_profile() self.__gs = sn_helpers.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_1_id, ) self.__sc = sn_helpers.create_sc( user_profile=self.__test_user_profile, identifier=self.__sc_1_id )
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__sc_1_id = 'sc-xatcobeo' self.__sc_1_ch_1_id = 'xatco-fm-1' self.__sc_1_ch_2_id = 'xatco-fm-2' self.__sc_1_ch_3_id = 'xatco-fm-3' self.__sc_1_ch_4_id = 'xatco-afsk-1' self.__band = sn_helpers.create_band() self.__test_user_profile = sn_helpers.create_user_profile() self.__gs = sn_helpers.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_1_id, ) self.__sc = sn_helpers.create_sc(user_profile=self.__test_user_profile, identifier=self.__sc_1_id)
def setUp(self): """ This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False self.__test_slot_id = -1 self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'gmsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = 'gs-la-fm' self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id, tle_id=self.__sc_1_tle_id, ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel(self.__gs_1, self.__band, self.__gs_1_ch_1_id) self.__rule_1 = jrpc_rules.add_rule( self.__gs_1_id, db_tools.create_jrpc_daily_rule( date_i=sn_misc.get_today_utc(), date_f=sn_misc.get_today_utc() + datetime.timedelta(days=50), starting_time=sn_misc.get_next_midnight() + datetime.timedelta(seconds=1), ending_time=sn_misc.get_next_midnight() + datetime.timedelta(hours=23, minutes=59, seconds=59)))
def setUp(self): """ This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('common').setLevel(level=logging.CRITICAL) logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) # noinspection PyUnresolvedReferences from services.scheduling.signals import availability self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = str('xatcobeo-fm') self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = str('gs-la-fm') self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__gs_1_ch_2_id = 'gs-la-fm-2' self.__gs_1_ch_2_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id, tle_id=self.__sc_1_tle_id, ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) operational_models.OperationalSlot.objects.set_debug()
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL) # noinspection PyUnresolvedReferences from services.scheduling.signals import compatibility self.__gs_1_id = 'uvigo' self.__gs_1_ch_1_id = 'qpsk-gs-1' self.__gs_1_ch_2_id = 'qpsk-gs-2' self.__gs_2_id = 'calpoly' self.__sc_1_id = 'humd' self.__sc_1_ch_1_id = 'gmsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_2_id = 'gmsk-sc-2' self.__sc_2_id = 'beesat' self.__band = db_tools.create_band() self.__test_user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id ) self.__gs_2 = db_tools.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_2_id, ) self.__sc_1 = db_tools.create_sc( user_profile=self.__test_user_profile, identifier=self.__sc_1_id ) self.__sc_2 = db_tools.create_sc( user_profile=self.__test_user_profile, identifier=self.__sc_2_id ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, )
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'uvigo' self.__gs_1_ch_1_id = 'qpsk-gs-1' self.__gs_1_ch_2_id = 'qpsk-gs-2' self.__gs_2_id = 'calpoly' self.__sc_1_id = 'humd' self.__sc_1_ch_1_id = 'gmsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_2_id = 'gmsk-sc-2' self.__sc_2_id = 'beesat' self.__band = db_tools.create_band() self.__test_user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel(self.__gs_1, self.__band, self.__gs_1_ch_1_id) self.__gs_2 = db_tools.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_2_id, ) self.__sc_1 = db_tools.create_sc(user_profile=self.__test_user_profile, identifier=self.__sc_1_id) self.__sc_2 = db_tools.create_sc(user_profile=self.__test_user_profile, identifier=self.__sc_2_id) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, ) if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL)
def setUp(self): super(TestTle, self).setUp() self.__verbose_testing = False self.__sc_1_id = 'sc-humsat' self.__sc_1_tle_id = 'HUMSAT-D' self.__user_profile = None self.__sc_2_id = 'fake-sat' self.__sc_2_tle_id = 'XXX99X9X' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() if not self.__verbose_testing: logging.getLogger('simulation').setLevel(level=logging.CRITICAL)
def setUp(self): self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__gs_2_id = 'gs-cuvi' self.__band = sn_helpers.create_band() self.__user_profile = sn_helpers.create_user_profile() self.__gs = sn_helpers.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, )
def setUp(self): self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs, self.__band, self.__gs_1_ch_1_id )
def setUp(self): self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel(self.__gs, self.__band, self.__gs_1_ch_1_id)
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_id = 'uvigo' self.__gs_ch_1_id = 'qpsk-gs-1' self.__gs_ch_2_id = 'qpsk-gs-2' self.__sc_id = 'humd' self.__sc_ch_1_id = 'gmsk-sc-1' self.__sc_ch_f = 437000000 self.__sc_ch_2_id = 'gmsk-sc-2' self.__sc_id = 'beesat' self.__band = db_tools.create_band() self.__test_user_profile = db_tools.create_user_profile() self.__gs = db_tools.create_gs( user_profile=self.__test_user_profile, identifier=self.__gs_id, ) self.__gs_ch_1 = db_tools.gs_add_channel( self.__gs, self.__band, self.__gs_ch_1_id ) self.__gs_ch_2 = db_tools.gs_add_channel( self.__gs, self.__band, self.__gs_ch_2_id ) self.__sc = db_tools.create_sc( user_profile=self.__test_user_profile, identifier=self.__sc_id ) self.__sc_ch_1 = db_tools.sc_add_channel( self.__sc, self.__sc_ch_f, self.__sc_ch_1_id, ) self.__sc_ch_2 = db_tools.sc_add_channel( self.__sc, self.__sc_ch_f, self.__sc_ch_2_id, )
def setUp(self): """Test setup Initial database configuration for the tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('common').setLevel(level=logging.CRITICAL) logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_callsign = 'GS1GSGS' self.__gs_1_contact_elevation = 10.30 self.__gs_1_longitude = -8.9330 self.__gs_1_latitude = 42.6000 self.__gs_1_configuration = ( self.__gs_1_callsign, 10.3, self.__gs_1_latitude, self.__gs_1_longitude ) self.__gs_1_ch_1_id = 'fm-1' self.__gs_1_ch_2_id = 'afsk-2' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__http_request = db_tools.create_request( user_profile=self.__user_profile ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, callsign=self.__gs_1_callsign, contact_elevation=self.__gs_1_contact_elevation, latitude=self.__gs_1_latitude, longitude=self.__gs_1_longitude, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id, )
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = True if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('django.db.backends.schema')\ .setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__gs_1_ch_2_id = 'chan-cas-2' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id ) self.__gs_1_ch_2 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_2_id ) self.__sc_1_id = 'humd' self.__sc_1_ch_1_id = 'gmsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_2_id = 'gmsk-sc-2' self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, )
def setUp(self): """ Populates the initial database with a set of objects required to run the following tests. """ self.__verbose_testing = True if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('django.db.backends.schema')\ .setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__gs_1_ch_2_id = 'chan-cas-2' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel(self.__gs_1, self.__band, self.__gs_1_ch_1_id) self.__gs_1_ch_2 = db_tools.gs_add_channel(self.__gs_1, self.__band, self.__gs_1_ch_2_id) self.__sc_1_id = 'humd' self.__sc_1_ch_1_id = 'gmsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_2_id = 'gmsk-sc-2' self.__sc_1 = db_tools.create_sc(user_profile=self.__user_profile, identifier=self.__sc_1_id) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, )
def setUp(self): """Test setup Initial database configuration for the tests. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('common').setLevel(level=logging.CRITICAL) logging.getLogger('configuration').setLevel(level=logging.CRITICAL) self.__gs_1_id = 'gs-castrelos' self.__gs_1_callsign = 'GS1GSGS' self.__gs_1_contact_elevation = 10.30 self.__gs_1_longitude = -8.9330 self.__gs_1_latitude = 42.6000 self.__gs_1_configuration = (self.__gs_1_callsign, 10.3, self.__gs_1_latitude, self.__gs_1_longitude) self.__gs_1_ch_1_id = 'fm-1' self.__gs_1_ch_2_id = 'afsk-2' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__http_request = db_tools.create_request( user_profile=self.__user_profile) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, callsign=self.__gs_1_callsign, contact_elevation=self.__gs_1_contact_elevation, latitude=self.__gs_1_latitude, longitude=self.__gs_1_longitude, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id, )
def setUp(self): self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) self.__rule_date = misc.get_today_utc() self.__rule_s_time = misc.get_today_utc().replace( hour=12, minute=0, second=0, microsecond=0 ) self.__rule_e_time = self.__rule_s_time + datetime.timedelta(hours=5) self.__utc_s_date = self.__rule_date - datetime.timedelta(days=1) self.__utc_e_date = self.__rule_date + datetime.timedelta(days=365) self.__utc_s_time = self.__rule_s_time self.__utc_e_time = self.__rule_e_time self.__gs_1_id = 'gs-castrelos' self.__gs_1_ch_1_id = 'chan-cas-1' self.__gs_2_id = 'gs-cuvi' # noinspection PyUnresolvedReferences from services.scheduling.signals import availability, compatibility self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__gs_2 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_2_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs, self.__band, self.__gs_1_ch_1_id )
def test_bug_1(self): """INTR test: services.scheduling - operational slot generation """ self.__gs_1_id = 'gs-vigo' self.__gs_1_ch_1_id = 'chan-cas-1' self.__sc_1_id = 'sc-serpens' self.__sc_1_ch_1_id = 'xatco-fm-1' self.__sc_1_ch_1_f = 437500000 self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() # 1) create vigo gs self.__gs = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id ) # CHECK A: NO ADDITIONAL pass slots, no operational slots # ### There are pass slots for the already-propagated spacecraft p_slots_0 = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id ) self.assertEqual(len(p_slots_0), 0) o_slots_0 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_0 ) self.assertEqual(len(o_slots_0), 0) # 2) serpens spacecraft self.__sc = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id ) # CHECK B: MORE pass slots, no operational slots # ### There are pass slots for the already-propagated spacecraft p_slots_1 = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id ) self.assertGreater(len(p_slots_1), len(p_slots_0)) o_slots_0 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_0 ) self.assertEqual(len(o_slots_0), 0) # 3) we add channels and, therefore, compatibility matches # without availability rules, no operational slots self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs, self.__band, self.__gs_1_ch_1_id ) # CHECK C: SAME pass slots, no operational slots # ### There are pass slots for the already-propagated spacecraft p_slots_2 = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id ) self.assertEqual(len(p_slots_2), len(p_slots_1)) o_slots_0 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_0 ) self.assertEqual(len(o_slots_0), 0) # 4) we add a daily rule 12 hours, 00:00:01am to 11:59:59pm UTC # all pass slots should became operational slots. self.__rule_1 = rules_jrpc.add_rule( self.__gs_1_id, db_tools.create_jrpc_daily_rule( date_i=sn_misc.get_today_utc(), date_f=sn_misc.get_today_utc() + datetime.timedelta(days=50), starting_time=sn_misc.get_next_midnight() + datetime.timedelta( seconds=1 ), ending_time=sn_misc.get_next_midnight() + datetime.timedelta( hours=23, minutes=59, seconds=59 ) ) ) # CHECK D: 3 availability slots (1 per day, almost 24 hours) # should transform all pass slots into operational slots a_slots = availability_models.AvailabilitySlot.objects.values_list( 'start', 'end' ) x_slots = [ ( sn_misc.get_today_utc() + datetime.timedelta( seconds=1 ), sn_misc.get_today_utc() + datetime.timedelta( hours=23, minutes=59, seconds=59 ) ), ( sn_misc.get_today_utc() + datetime.timedelta( days=1, seconds=1 ), sn_misc.get_today_utc() + datetime.timedelta( days=1, hours=23, minutes=59, seconds=59 ) ), ( sn_misc.get_today_utc() + datetime.timedelta( days=2, seconds=1 ), sn_misc.get_today_utc() + datetime.timedelta( days=2, hours=23, minutes=59, seconds=59 ) ) ] self.assertCountEqual(a_slots, x_slots) p_slots_applicable_objs = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id, start__gte=sn_misc.get_now_utc() ) p_slots_applicable = p_slots_applicable_objs.values_list( 'start', 'end' ) self.assertGreaterEqual(len(p_slots_2), len(p_slots_applicable)) o_slots_1 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_applicable_objs, state=operational_models.STATE_FREE ).values_list('start', 'end') self.assertCountEqual(p_slots_applicable, o_slots_1) # CHECK E: RPC interface should return an equivalent set of slots: o_slots_gs = gs_ops_rpc.get_operational_slots(self.__gs_1_id) self.assertEqual(len(o_slots_gs[self.__sc_1_id]), len(o_slots_1)) if self.__verbose_testing: sn_misc.print_list(o_slots_1, name='o_slots_1') sn_misc.print_list( o_slots_gs[self.__sc_1_id], name='o_slots-' + self.__gs_1_id )
def test_bug_1(self): """INTR test: services.scheduling - operational slot generation """ self.__gs_1_id = 'gs-vigo' self.__gs_1_ch_1_id = 'chan-cas-1' self.__sc_1_id = 'sc-serpens' self.__sc_1_ch_1_id = 'xatco-fm-1' self.__sc_1_ch_1_f = 437500000 self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() # 1) create vigo gs self.__gs = db_tools.create_gs(user_profile=self.__user_profile, identifier=self.__gs_1_id) # CHECK A: NO ADDITIONAL pass slots, no operational slots # ### There are pass slots for the already-propagated spacecraft p_slots_0 = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id) self.assertEqual(len(p_slots_0), 0) o_slots_0 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_0) self.assertEqual(len(o_slots_0), 0) # 2) serpens spacecraft self.__sc = db_tools.create_sc(user_profile=self.__user_profile, identifier=self.__sc_1_id) # CHECK B: MORE pass slots, no operational slots # ### There are pass slots for the already-propagated spacecraft p_slots_1 = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id) self.assertGreater(len(p_slots_1), len(p_slots_0)) o_slots_0 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_0) self.assertEqual(len(o_slots_0), 0) # 3) we add channels and, therefore, compatibility matches # without availability rules, no operational slots self.__sc_1_ch_1 = db_tools.sc_add_channel(self.__sc, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id) self.__gs_1_ch_1 = db_tools.gs_add_channel(self.__gs, self.__band, self.__gs_1_ch_1_id) # CHECK C: SAME pass slots, no operational slots # ### There are pass slots for the already-propagated spacecraft p_slots_2 = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id) self.assertEqual(len(p_slots_2), len(p_slots_1)) o_slots_0 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_0) self.assertEqual(len(o_slots_0), 0) # 4) we add a daily rule 12 hours, 00:00:01am to 11:59:59pm UTC # all pass slots should became operational slots. self.__rule_1 = rules_jrpc.add_rule( self.__gs_1_id, db_tools.create_jrpc_daily_rule( date_i=sn_misc.get_today_utc(), date_f=sn_misc.get_today_utc() + datetime.timedelta(days=50), starting_time=sn_misc.get_next_midnight() + datetime.timedelta(seconds=1), ending_time=sn_misc.get_next_midnight() + datetime.timedelta(hours=23, minutes=59, seconds=59))) # CHECK D: 3 availability slots (1 per day, almost 24 hours) # should transform all pass slots into operational slots a_slots = availability_models.AvailabilitySlot.objects.values_list( 'start', 'end') x_slots = [ (sn_misc.get_today_utc() + datetime.timedelta(seconds=1), sn_misc.get_today_utc() + datetime.timedelta(hours=23, minutes=59, seconds=59)), (sn_misc.get_today_utc() + datetime.timedelta(days=1, seconds=1), sn_misc.get_today_utc() + datetime.timedelta(days=1, hours=23, minutes=59, seconds=59)), (sn_misc.get_today_utc() + datetime.timedelta(days=2, seconds=1), sn_misc.get_today_utc() + datetime.timedelta(days=2, hours=23, minutes=59, seconds=59)) ] self.assertCountEqual(a_slots, x_slots) p_slots_applicable_objs = pass_models.PassSlots.objects.filter( groundstation__identifier=self.__gs_1_id, spacecraft__identifier=self.__sc_1_id, start__gte=sn_misc.get_now_utc()) p_slots_applicable = p_slots_applicable_objs.values_list( 'start', 'end') self.assertGreaterEqual(len(p_slots_2), len(p_slots_applicable)) o_slots_1 = operational_models.OperationalSlot.objects.filter( pass_slot__in=p_slots_applicable_objs, state=operational_models.STATE_FREE).values_list('start', 'end') self.assertCountEqual(p_slots_applicable, o_slots_1) # CHECK E: RPC interface should return an equivalent set of slots: o_slots_gs = gs_ops_rpc.get_operational_slots(self.__gs_1_id) self.assertEqual(len(o_slots_gs[self.__sc_1_id]), len(o_slots_1)) if self.__verbose_testing: sn_misc.print_list(o_slots_1, name='o_slots_1') sn_misc.print_list(o_slots_gs[self.__sc_1_id], name='o_slots-' + self.__gs_1_id)
def setUp(self): """ This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False self.__test_slot_id = -1 self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'gmsk-sc-1' self.__sc_1_ch_1_f = 437000000 self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = 'gs-la-fm' self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id, tle_id=self.__sc_1_tle_id, ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id ) self.__rule_1 = jrpc_rules.add_rule( self.__gs_1_id, db_tools.create_jrpc_daily_rule( date_i=sn_misc.get_today_utc(), date_f=sn_misc.get_today_utc() + datetime.timedelta(days=50), starting_time=sn_misc.get_next_midnight() + datetime.timedelta( seconds=1 ), ending_time=sn_misc.get_next_midnight() + datetime.timedelta( hours=23, minutes=59, seconds=59 ) ) )
def setUp(self): """Database setup """ self.__verbose_testing = False self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'xatcobeo-fm' self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = 'gs-la-fm' self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__gs_1_ch_2_id = 'gs-la-fm-2' self.__gs_1_ch_2_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id, tle_id=self.__sc_1_tle_id, ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.assertEqual( jrpc_gs_chs.gs_channel_create( groundstation_id=self.__gs_1_id, channel_id=self.__gs_1_ch_1_id, configuration=self.__gs_1_ch_1_cfg ), True, 'Channel should have been created!' ) self.assertRaises( Exception, jrpc_gs_scheduling.get_operational_slots, self.__gs_1_ch_1_id ) # 3) basic test, should generate 2 FREE slots self.assertEqual( jrpc_sc_chs.sc_channel_create( spacecraft_id=self.__sc_1_id, channel_id=self.__sc_1_ch_1_id, configuration=self.__sc_1_ch_1_cfg ), True, 'Channel should have been created!' ) # 4) we add a daily rule 12 hours, 00:00:01am to 11:59:59pm UTC # all pass slots should became operational slots. self.__rule_1 = jrpc_rules.add_rule( self.__gs_1_id, db_tools.create_jrpc_daily_rule( date_i=misc.get_today_utc(), date_f=misc.get_today_utc() + datetime.timedelta(days=50), starting_time=misc.get_next_midnight() + datetime.timedelta( seconds=1 ), ending_time=misc.get_next_midnight() + datetime.timedelta( hours=23, minutes=59, seconds=59 ) ) )
def setUp(self): """ This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('common').setLevel(level=logging.CRITICAL) logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) operational.OperationalSlot.objects.set_debug() self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'xatcobeo-fm' self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = 'gs-la-fm' self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__gs_1_ch_2_id = 'gs-la-fm-2' self.__gs_1_ch_2_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id, tle_id=self.__sc_1_tle_id, ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, ) self.assertEqual( jrpc_gs_chs.gs_channel_create(groundstation_id=self.__gs_1_id, channel_id=self.__gs_1_ch_1_id, configuration=self.__gs_1_ch_1_cfg), True, 'Channel should have been created!') self.assertRaises(Exception, jrpc_gs_scheduling.get_operational_slots, self.__gs_1_ch_1_id) # 3) basic test, should generate 2 FREE slots self.assertEqual( jrpc_sc_chs.sc_channel_create(spacecraft_id=self.__sc_1_id, channel_id=self.__sc_1_ch_1_id, configuration=self.__sc_1_ch_1_cfg), True, 'Channel should have been created!') # 4) we add a daily rule 12 hours, 00:00:01am to 11:59:59pm UTC # all pass slots should became operational slots. self.__rule_1 = jrpc_rules.add_rule( self.__gs_1_id, db_tools.create_jrpc_daily_rule( date_i=misc.get_today_utc(), date_f=misc.get_today_utc() + datetime.timedelta(days=50), starting_time=misc.get_next_midnight() + datetime.timedelta(seconds=1), ending_time=misc.get_next_midnight() + datetime.timedelta(hours=23, minutes=59, seconds=59)))
def setUp(self): """ This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) self.__rule_1_cfg = db_tools.create_jrpc_daily_rule( starting_time=misc.localize_time_utc(datetime.time( hour=8, minute=0, second=0 )), ending_time=misc.localize_time_utc(datetime.time( hour=23, minute=55, second=0 )) ) self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'xatcobeo-fm' self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = 'gs-la-fm' self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__gs_1_ch_2_id = 'gs-la-fm-2' self.__gs_1_ch_2_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } # noinspection PyUnresolvedReferences from services.scheduling.signals import availability # noinspection PyUnresolvedReferences from services.scheduling.signals import compatibility # noinspection PyUnresolvedReferences from services.scheduling.signals import operational self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, )
def setUp(self): """Test setup This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False self.__gs_1_id = 'gs-castrelos' self.__gs_1_callsign = 'GS1GSGS' self.__gs_1_contact_elevation = 10.30 self.__gs_1_longitude = -8.9330 self.__gs_1_latitude = 42.6000 self.__gs_1_configuration = ( self.__gs_1_callsign, 10.3, self.__gs_1_latitude, self.__gs_1_longitude ) self.__gs_2_id = 'gs-calpoly' self.__gs_1_ch_1_id = 'fm-1' self.__gs_1_ch_2_id = 'afsk-2' self.__sc_1_id = 'sc-xatcobeo' self.__sc_1_callsign = 'BABA00' self.__sc_1_tle_id = str('HUMSAT-D') self.__sc_1_ch_1_id = 'xatcobeo-qpsk-1' self.__sc_1_ch_2_id = 'xatcobeo-gmsk-2' self.__sc_1_ch_1_f = 437000000 self.__sc_1_configuration = ( self.__sc_1_callsign, self.__sc_1_tle_id ) self.__sc_2_id = 'sc-swisscube' self.__sc_2_tle_id = str('SWISSCUBE') self.__sc_3_id = 'sc-somp' self.__sc_3_tle_id = str('SOMP') self.__sc_4_id = 'sc-test' self.__sc_4_callsign = 'GOXX5' self.__sc_4_tle_id = 'GOES 4 [-]' self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__http_request = db_tools.create_request( user_profile=self.__user_profile ) self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, callsign=self.__gs_1_callsign, contact_elevation=self.__gs_1_contact_elevation, latitude=self.__gs_1_latitude, longitude=self.__gs_1_longitude, ) self.__gs_1_ch_1 = db_tools.gs_add_channel( self.__gs_1, self.__band, self.__gs_1_ch_1_id, ) self.__gs_2 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_2_id ) self.__sc_1 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_1_id, callsign=self.__sc_1_callsign, tle_id=self.__sc_1_tle_id ) self.__sc_1_ch_1 = db_tools.sc_add_channel( self.__sc_1, self.__sc_1_ch_1_f, self.__sc_1_ch_1_id, ) self.__sc_2 = db_tools.create_sc( user_profile=self.__user_profile, identifier=self.__sc_2_id, tle_id=self.__sc_2_tle_id ) if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('simulation').setLevel(level=logging.CRITICAL) logging.getLogger('common').setLevel(level=logging.CRITICAL)
def setUp(self): """ This method populates the database with some information to be used only for this test. """ self.__verbose_testing = False if not self.__verbose_testing: logging.getLogger('configuration').setLevel(level=logging.CRITICAL) logging.getLogger('scheduling').setLevel(level=logging.CRITICAL) self.__rule_1_cfg = db_tools.create_jrpc_daily_rule( starting_time=misc.localize_time_utc( datetime.time(hour=8, minute=0, second=0)), ending_time=misc.localize_time_utc( datetime.time(hour=23, minute=55, second=0))) self.__sc_1_id = 'xatcobeo-sc' self.__sc_1_tle_id = 'HUMSAT-D' self.__sc_1_ch_1_id = 'xatcobeo-fm' self.__sc_1_ch_1_cfg = { channel_serializers.FREQUENCY_K: '437000000', channel_serializers.MODULATION_K: 'FM', channel_serializers.POLARIZATION_K: 'LHCP', channel_serializers.BITRATE_K: '300', channel_serializers.BANDWIDTH_K: '12.500000000' } self.__gs_1_id = 'gs-la' self.__gs_1_ch_1_id = 'gs-la-fm' self.__gs_1_ch_1_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } self.__gs_1_ch_2_id = 'gs-la-fm-2' self.__gs_1_ch_2_cfg = { channel_serializers.BAND_K: 'UHF / U / 435000000.000000 / 438000000.000000', channel_serializers.AUTOMATED_K: False, channel_serializers.MODULATIONS_K: ['FM'], channel_serializers.POLARIZATIONS_K: ['LHCP'], channel_serializers.BITRATES_K: [300, 600, 900], channel_serializers.BANDWIDTHS_K: [12.500000000, 25.000000000] } # noinspection PyUnresolvedReferences from services.scheduling.signals import availability # noinspection PyUnresolvedReferences from services.scheduling.signals import compatibility # noinspection PyUnresolvedReferences from services.scheduling.signals import operational self.__band = db_tools.create_band() self.__user_profile = db_tools.create_user_profile() self.__gs_1 = db_tools.create_gs( user_profile=self.__user_profile, identifier=self.__gs_1_id, )