#NEWLINE# def test_validate_networks_not_in_db( self ) : #NEWLINE# #INDENT# mgmt = self . find_net_by_name ( consts . NETWORKS . management ) #NEWLINE# sto = self . find_net_by_name ( consts . NETWORKS . storage ) #NEWLINE# mgmt_db = self . db . query ( NetworkGroup ) . get ( mgmt [ 'id' ] ) #NEWLINE# sto_db = self . db . query ( NetworkGroup ) . get ( sto [ 'id' ] ) #NEWLINE# self . db . delete ( mgmt_db ) #NEWLINE# self . db . delete ( sto_db ) #NEWLINE# self . db . flush ( ) #NEWLINE# exc_context = self . get_context_of_validation_error ( ) #NEWLINE# message = exc_context . exception . message #NEWLINE# self . assertEqual ( "Networks with ID's [{0}, {1}] are not present in the database" . format ( * sorted ( [ sto [ 'id' ] , mgmt [ 'id' ] ] ) ) , message )