#NEWLINE# def test_prefix( ) : #NEWLINE# #INDENT# db = SQLAlchemy ( 'sqlite:///:memory:' ) #NEWLINE# auth1 = authcode . Auth ( SECRET_KEY , db = db , roles = True , prefix = 'foobar' ) #NEWLINE# assert ( auth1 . users_model_name == 'FoobarUser' ) #NEWLINE# assert ( auth1 . roles_model_name == 'FoobarRole' ) #NEWLINE# assert ( auth1 . views_prefix == 'foobar_' ) #NEWLINE# assert ( auth1 . url_sign_in == '/foobar/sign-in/' ) #NEWLINE# assert ( auth1 . url_sign_out == '/foobar/sign-out/' ) #NEWLINE# assert ( auth1 . url_reset_password == '/foobar/reset-password/' ) #NEWLINE# assert ( auth1 . url_change_password == '/foobar/change-password/' ) #NEWLINE# auth2 = authcode . Auth ( SECRET_KEY , db = db , roles = True , prefix = 'meh' ) #NEWLINE# assert ( auth2 . users_model_name == 'MehUser' ) #NEWLINE# assert ( auth2 . roles_model_name == 'MehRole' ) #NEWLINE# assert ( auth2 . views_prefix == 'meh_' ) #NEWLINE# assert ( auth2 . url_sign_in == '/meh/sign-in/' ) #NEWLINE# assert ( auth2 . url_sign_out == '/meh/sign-out/' ) #NEWLINE# assert ( auth2 . url_reset_password == '/meh/reset-password/' ) #NEWLINE# assert ( auth2 . url_change_password == '/meh/change-password/' )