#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def test_set_appservices_state_multiple_up( self ) : #NEWLINE# #INDENT# service = Mock ( id = self . as_list [ 1 ] [ 'id' ] ) #NEWLINE# ( yield self . store . set_appservice_state ( service , ApplicationServiceState . UP ) ) #NEWLINE# ( yield self . store . set_appservice_state ( service , ApplicationServiceState . DOWN ) ) #NEWLINE# ( yield self . store . set_appservice_state ( service , ApplicationServiceState . UP ) ) #NEWLINE# rows = ( yield self . db_pool . runQuery ( 'SELECT as_id FROM application_services_state WHERE state=?' , ( ApplicationServiceState . UP , ) ) ) #NEWLINE# self . assertEquals ( service . id , rows [ 0 ] [ 0 ] )