#NEWLINE# def test_db_based_model( self , mock_reg , mock_subscribers , mock_proc ) : #NEWLINE# #INDENT# from nefertari.authentication.models import AuthModelMethodsMixin #NEWLINE# from ramses import models #NEWLINE# config = config_mock ( ) #NEWLINE# schema = self . _test_schema ( ) #NEWLINE# schema [ 'properties' ] [ 'progress' ] = { #NEWLINE# #INDENT# '_db_settings' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# mock_reg . mget . return_value = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } #NEWLINE# ( model_cls , auth_model ) = models . generate_model_cls ( config , schema = schema , model_name = 'Story' , raml_resource = None , es_based = False ) #NEWLINE# assert issubclass ( model_cls , models . engine . BaseDocument ) #NEWLINE# assert ( not issubclass ( model_cls , models . engine . ESBaseDocument ) ) #NEWLINE# assert ( not issubclass ( model_cls , AuthModelMethodsMixin ) )