#NEWLINE# @ patch ( 'jumpgate.api.importlib.import_module' ) #NEWLINE# def test_load_drivers( self , import_module ) : #NEWLINE# #INDENT# compute_disp = MagicMock ( ) #NEWLINE# identity_disp = MagicMock ( ) #NEWLINE# self . app . _dispatchers = { #NEWLINE# #INDENT# 'compute' : compute_disp , #NEWLINE# 'identity' : identity_disp , #NEWLINE# #UNINDENT# } #NEWLINE# self . app . config = TEST_CFG #NEWLINE# self . app . load_drivers ( ) #NEWLINE# import_module . assert_has_calls ( [ call ( 'path.to.compute.driver' ) , call ( ) . setup_routes ( self . app , compute_disp ) , call ( 'path.to.identity.driver' ) , call ( ) . setup_routes ( self . app , identity_disp ) ] , any_order = True )