#NEWLINE# @ patch ( 'ramses.models.resource_schema' ) #NEWLINE# @ patch ( 'ramses.models.get_existing_model' ) #NEWLINE# def test_setup_data_model_existing_auth_model( self , mock_get , mock_schema ) : #NEWLINE# #INDENT# from ramses import models #NEWLINE# config = Mock ( ) #NEWLINE# mock_get . return_value = 1 #NEWLINE# mock_schema . return_value = { #NEWLINE# #INDENT# '_auth_model' : True , #NEWLINE# #UNINDENT# } #NEWLINE# ( model , auth_model ) = models . setup_data_model ( config , 'foo' , 'Bar' ) #NEWLINE# assert auth_model #NEWLINE# assert ( model == 1 ) #NEWLINE# mock_get . assert_called_once_with ( 'Bar' )