#NEWLINE# def test_correct_setup( self ) : #NEWLINE# #INDENT# request = MockRequest ( ) #NEWLINE# request . GET = { #NEWLINE# #INDENT# 'format' : 'json' , #NEWLINE# #UNINDENT# } #NEWLINE# request . method = 'GET' #NEWLINE# resource = api . canonical_resource_for ( 'taggabletag' ) #NEWLINE# resp = resource . wrap_view ( 'dispatch_detail' ) ( request , pk = self . taggabletag_1 . pk ) #NEWLINE# data = json . loads ( resp . content ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# self . assertEqual ( data [ 'tag' ] , '/v1/tag/1/' ) #NEWLINE# self . assertEqual ( data [ 'taggable' ] , '/v1/taggable/1/' ) #NEWLINE# resource = api . canonical_resource_for ( 'taggable' ) #NEWLINE# resp = resource . wrap_view ( 'dispatch_detail' ) ( request , pk = self . taggable_1 . pk ) #NEWLINE# data = json . loads ( data . content ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# self . assertEqual ( data [ 'name' ] , 'exam' ) #NEWLINE# resource = api . canonical_resource_for ( 'tag' ) #NEWLINE# resp = resource . wrap_view ( 'dispatch_detail' ) ( request , pk = self . tag_1 . pk ) #NEWLINE# data = json . loads ( resp . content ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# self . assertEqual ( data [ 'name' ] , 'important' ) #NEWLINE# self . assertEqual ( data [ 'extradata' ] [ 'name' ] , 'additional' )