#NEWLINE# def test_hyperlink_related_field_list( self , extma , models , db , extapp ) : #NEWLINE# #INDENT# class AuthorSchema ( extma . ModelSchema ) : #NEWLINE# #INDENT# class Meta ( ) : #NEWLINE# #INDENT# model = models . Author #NEWLINE# #UNINDENT# books = extma . List ( HyperlinkRelated ( 'book' ) ) #NEWLINE# #UNINDENT# author_schema = AuthorSchema ( ) #NEWLINE# author = models . Author ( name = 'Chuck Paluhniuk' ) #NEWLINE# book = models . Book ( title = 'Fight Club' , author = self ) #NEWLINE# db . session . add ( author ) #NEWLINE# db . session . add ( book ) #NEWLINE# db . session . flush ( ) #NEWLINE# author_result = author_schema . dump ( author ) #NEWLINE# assert ( author_result . data [ 'books' ] [ 0 ] == book . url ) #NEWLINE# deserialized = author_schema . load ( author_result . data ) #NEWLINE# assert ( deserialized . data . books [ 0 ] == book )