#NEWLINE# def test_sc_get_changes( self ) : #NEWLINE# #INDENT# 'JRPC test: services.scheduling.sc.getChanges\n        Validates the JRPC method <sc_get_changes>.\n        ' #NEWLINE# if self . __verbose_testing : #NEWLINE# #INDENT# print ( '##### test_gs_get_operational_slots' ) #NEWLINE# self . maxDiff = None #NEWLINE# #UNINDENT# operational_models . OperationalSlot . objects . reset_ids_counter ( ) #NEWLINE# self . assertTrue ( 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 ) , 'Channel should have been created!' ) #NEWLINE# self . assertTrue ( 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 ) , 'Channel should have been created!' ) #NEWLINE# date_i = ( misc . get_today_utc ( ) + datetime . timedelta ( days = 1 ) ) #NEWLINE# date_f = ( misc . get_today_utc ( ) + datetime . timedelta ( days = 366 ) ) #NEWLINE# s_time = ( misc . get_next_midnight ( ) - datetime . timedelta ( hours = 23 ) ) #NEWLINE# e_time = ( s_time + datetime . timedelta ( hours = 20 ) ) #NEWLINE# jrpc_rules . add_rule ( self . __gs_1_id , db_tools . create_jrpc_daily_rule ( date_i = date_i , date_f = date_f , starting_time = s_time , ending_time = e_time ) ) #NEWLINE# if self . __verbose_testing : #NEWLINE# #INDENT# misc . print_list ( operational_models . OperationalSlot . objects . all ( ) ) #NEWLINE# #UNINDENT# self . assertGreater ( len ( operational_models . OperationalSlot . objects . all ( ) ) , 0 , 'Wrong slots number!' ) #NEWLINE# date_i = ( misc . get_today_utc ( ) + datetime . timedelta ( days = 1 ) ) #NEWLINE# date_f = ( misc . get_today_utc ( ) + datetime . timedelta ( days = 366 ) ) #NEWLINE# s_time = ( misc . get_next_midnight ( ) - datetime . timedelta ( hours = 23 ) ) #NEWLINE# e_time = ( s_time + datetime . timedelta ( hours = 20 ) ) #NEWLINE# jrpc_rules . add_rule ( self . __gs_1_id , db_tools . create_jrpc_daily_rule ( date_i = date_i , date_f = date_f , starting_time = s_time , ending_time = e_time ) ) #NEWLINE# self . assertGreater ( len ( operational_models . OperationalSlot . objects . all ( ) ) , 0 , 'Wrong slots number!' ) #NEWLINE# self . assertTrue ( jrpc_gs_chs . gs_channel_delete ( groundstation_id = self . __gs_1_id , channel_id = self . __gs_1_ch_1_id ) , ( 'Could not delete GroundStationChannel = ' + str ( self . __gs_1_ch_1_id ) ) ) #NEWLINE# self . assertEquals ( len ( operational_models . OperationalSlot . objects . all ( ) ) , 0 , 'Expected operational slots to be available' ) #NEWLINE# self . assertTrue ( jrpc_sc_chs . sc_channel_delete ( spacecraft_id = self . __sc_1_id , channel_id = self . __sc_1_ch_1_id ) , ( 'Could not delete SpacecraftChannel = ' + str ( self . __sc_1_ch_1_id ) ) ) #NEWLINE# self . assertEquals ( len ( operational_models . OperationalSlot . objects . all ( ) ) , 0 , 'Expected operational slots to be available' )